Clarity brings smart contracts to Bitcoin. It is a decidable language, meaning you can know, with certainty, from the code itself what the program will do. Clarity is interpreted (not compiled) & the source code is published on the blockchain. Clarity gives developers a safe way to build complex smart contracts for the world's most secure blockchain.
Clarity is open-source and supported by the Stacks Ecosystem, Hiro PBC, & Algorand.
Why Clarity?
The Clarity language uses precise and unambiguous syntax that allows developers to predict exactly how their contracts will be executed.
The Clarity language allows users to supply their own conditions for transactions that ensure that a contract may never unexpectedly transfer a token owned by a user.
No compiler
Contracts written in Clarity are broadcasted on the blockchain exactly as they are written by developers. This ensures that the code developers wrote, analyzed, and tested, is exactly what gets executed.
Post-conditions protect developers and users from smart contract bugs and abuse. Post-conditions are used to verify token balances at the end of smart contract calls.
Bitcoin state
With Clarity you have read access to the Bitcoin chain. Further plans will enable even deeper integration and visibility into Bitcoin.
Clear code
Getting Started
Clarity Docs
Jump straight into the initial Clarity documentation and orient yourself with the language.
The Clarity Language Reference
This repository is the primary reference for the Clarity language.
Clarity Jobs
Looking for a position at an exciting company building on Bitcoin?
Clarity Development Software
Learn to use the various Clarity programming tools available to you.
Clarity Book
Writing productive smart contracts that are predictable. Written by Clarity Labs lead Marvin Janssen.
Tutorials & Clarinet
Using Clarinet and tutorials from Hiro, you'll get a deeper understanding of how to work in Clarity safely.
Clarity Playground
Community Project: Do some exploratory programming with the online Clarity REPL.
Clarity Auditors
Find trained and vetted auditors for your project.
Clarity Templates
Simple template or ‘starter’ contracts, audited by CoinFabrik.
The Future of Smart Contracts
Clarity recognizes the need for smart contract languages that are more safe, secure, and predictable. Our goal is to help the smart contract industry mature beyond its current state. Clarity is designed by scientists from Princeton and MIT, and the open-source project is initially supported by various Stacks entities and Algorand. We welcome other projects and developers to join this effort and help contribute!