Blockstack Auth provides single sign on and authentication without third parties or remote servers.
On this page, you'll get an overview of authentication from a developer perspective.
## Authentication flow
## Authentication flow
For an application developer, the application flow is similar to the typical client-server flow used by centralized sign in services (e.g., OAuth). However, with Blockstack, the authentication flow happens entirely client-side.
For an application developer, the application flow is similar to the typical client-server flow used by centralized sign in services (e.g., OAuth). However, with Blockstack, the authentication flow happens entirely client-side.
Collections support data portability between applications. Blockstack supplies a `Contact` collection for use by Blockstack applications. Developers can create additional collection types, use them in their own applications, and publish them so other developers can make use of them too.
Collections support data portability between applications. Blockstack supplies a `Contact` collection for use by Blockstack applications. Developers can create additional collection types, use them in their own applications, and publish them so other developers can make use of them too.
description: Learn about the beta release of Collections and how you can start using it.
---
---
# Work with Collections (Preview)
## Introduction
Collections is the feature designed to make data portable among Blockstack applications. Sharing is accomplished by
Collections is the feature designed to make data portable among Blockstack applications. Sharing is accomplished by
storing a user's data in a standardized format at a known, Gaia storage location. Collections associate user data with
storing a user's data in a standardized format at a known, Gaia storage location. Collections associate user data with
@ -11,13 +12,9 @@ a user's decentralized ID. When users move among apps, the same data is availabl
On this page, you learn what collections are and how to use them. You'll learn about the `Contact` collection in
On this page, you learn what collections are and how to use them. You'll learn about the `Contact` collection in
particular. The following topics are covered:
particular. The following topics are covered:
> #### Preview release
-> This is a preview release of the `Contact` collections. This release allows developers to try out the new collections functionality and we are interested in collecting feedback. Please feel free to report issues or request enhancements with collections or `Contacts` themselves on the [blockstack-collections repository](https://github.com/blockstack/blockstack-collections/issues/new).
>
> This is a preview release of the `Contact` collections. This release allows developers to try out the new collections
~> If you encounter problems with `blockstack.js` you can [file issues or request enhancements on its repo](https://github.com/blockstack/blockstack.js/issues/new).
> functionality and we are interested in collecting feedback. Please feel free to report issues or request enhancements
> with collections or `Contacts` themselves on the [blockstack-collections repository](https://github.com/blockstack/blockstack-collections/issues/new).
>
> If you encounter problems with `blockstack.js` you can [file issues or request enhancements on its repo](https://github.com/blockstack/blockstack.js/issues/new).
description: This section explains registering BNS names and provides instructions for methods you can use to understand the cost of namespace registration.
description: This section explains registering BNS names and provides instructions for methods you can use to understand the cost of namespace registration.
---
---
# Register a name
This section explains registering BNS names and provides instructions for methods
you can use to understand the cost of namespace registration.
## Understand registration
## Understand registration
Registering a BNS name costs cryptocurrency. This cost comes from two sources:
Registering a BNS name costs cryptocurrency. This cost comes from two sources:
export { convertBlockstackCLIUsageToMdx as getStaticProps } from '@common/data/cli-ref'
export { convertBlockstackCLIUsageToMdx as getStaticProps } from '@common/data/cli-ref'
import { CLIReferenceTable } from '@components/cli-reference'
import { CLIReferenceTable } from '@components/cli-reference'
# Blockstack CLI reference
## Introduction
The command line is intended for developers only. Developers can use the command
The command line is intended for developers only. Developers can use the command
line to test and debug Blockstack applications in ways that the Blockstack
line to test and debug Blockstack applications in ways that the Blockstack
@ -17,8 +17,7 @@ Browser does not yet support. Using the command line, developers can:
- Query Stacks Nodes
- Query Stacks Nodes
- Implement a minimum viable authentication flow
- Implement a minimum viable authentication flow
!> Many of the commands operate on unencrypted private keys. For this reason,
!> Many of the commands operate on unencrypted private keys. For this reason, **DO NOT** use this tool for day-to-day tasks as you risk the security of your keys.
DO NOT use this tool for day-to-day tasks as you risk the security of your keys.
You must install the command line before you can use the commands.
You must install the command line before you can use the commands.
description: Learn some common methods for deploying your application.
---
---
# Deployment
## Introduction
Blockstack applications are web applications that authenticate users with Blockstack Auth and store data with Gaia. Both of these technologies can be accessed on the client side. As such, Blockstack apps tend to be simple in design and operation, since in many cases, they don’t have to host anything besides the application’s assets.
Blockstack applications are web applications that authenticate users with Blockstack Auth and store data with Gaia.
Both of these technologies can be accessed on the client side. As such, Blockstack apps tend to be simple in design and
operation, since in many cases, they don’t have to host anything besides the application’s assets.
description: This is a comprehensive list of all the Blockstack FAQs.
redirect_from: /org/voucherholder
---
export { convertFaqAnswersToMDX as getStaticProps } from '@common/data/faq'
import { FAQs } from '@components/faq'
# Blockstack FAQs
This is a comprehensive list of all the Blockstack FAQs.
## General questions
<FAQscategory="general"data={props.mdx}/>
## Application user questions
<FAQscategory="appusers"data={props.mdx}/>
## Stacks Token questions
<FAQscategory="tokens"data={props.mdx}/>
## Stacks Wallet questions
<FAQscategory="wallet"data={props.mdx}/>
## DApp developers questions
<FAQscategory="appdevs"data={props.mdx}/>
## Core developer questions
<FAQscategory="coredevs"data={props.mdx}/>
## Open source developer questions
<FAQscategory="opensource"data={props.mdx}/>
## Miscellaneous questions
<FAQscategory="miscquest"data={props.mdx}/>
## Important disclaimer
_The Securities and Exchange Commission (SEC) has qualified the offering statement that we have filed with the SEC under Regulation A for our offering of certain of our Stacks Tokens. The information in that offering statement is more complete than the information we are providing now, and could differ in important ways. You must read the documents filed with the SEC before investing. The offering is being made only by means of its offering statement. This document shall not constitute an offer to sell or the solicitation of an offer to buy, nor shall there be any sale of these securities in any state or jurisdiction in which such offer, solicitation or sale would be unlawful prior to registration or qualification under the securities laws of any such state or jurisdiction._
_An indication of interest involves no obligation or commitment of any kind. Any person interested in investing in any offering of Stacks Tokens should review our disclosures and the publicly filed offering statement and the f<ahref='https://stackstoken.com/circular'>final offering circular</a> that is part of that offering statement. Blockstack is not registered, licensed or supervised as a broker dealer or investment adviser by the SEC, the Financial Industry Regulatory Authority (FINRA) or any other financial regulatory authority or licensed to provide any financial advice or services._
## Forward-looking statements
_This communication contains forward-looking statements that are based on our beliefs and assumptions and on information currently available to us. In some cases, you can identify forward-looking statements by the following words: “will,” “expect,” “would,” “intend,” “believe,” or other comparable terminology. Forward-looking statements in this document include, but are not limited to, statements about our plans for developing the platform and future utility for the Stacks Token, our Clarity smart contracting language, and potential mining operations. These statements involve risks, uncertainties, assumptions and other factors that may cause actual results or performance to be materially different. More information on the factors, risks and uncertainties that could cause or contribute to such differences is included in our filings with the SEC, including in the “Risk Factors” and “Management’s Discussion & Analysis” sections of our offering statement on Form 1-A. We cannot assure you that the forward-looking statements will prove to be accurate. These forward-looking statements speak only as of the date hereof. We disclaim any obligation to update these forward-looking statements._
description: Interacting with the Stacks 2.0 Blockchain
description: Interacting with the Stacks 2.0 Blockchain
---
---
# Stacks Blockchain APIs
## Introduction
With the launch of Stacks 2.0, a new version of the Blockstack blockchain was released. There are two ways of interacting with the blockchain, either using the Stacks Blockchain API or by making RPC calls to a Stacks Core directly.
With the launch of Stacks 2.0, a new version of the Blockstack blockchain was released. There are two ways of interacting with the blockchain, either using the Stacks Blockchain API or by making RPC calls to a Stacks Core directly.
@ -15,6 +15,6 @@ The Stacks 2.0 blockchain's Rust implementation exposes RPC endpoints (in JSON f
The Stacks Blockchain API was built to maintain pageable materialized views of the Stacks 2.0 Blockchain. It is a server that exposes a RESTful JSON API, hosted by PBC. It introduces aidditonal functionality (e.g. get all transactions), as well as proxies calls directly to Stacks Node. [You can find the OpenAPI specification and documentation here](https://blockstack.github.io/stacks-blockchain-sidecar/).
The Stacks Blockchain API was built to maintain pageable materialized views of the Stacks 2.0 Blockchain. It is a server that exposes a RESTful JSON API, hosted by PBC. It introduces aidditonal functionality (e.g. get all transactions), as well as proxies calls directly to Stacks Node. [You can find the OpenAPI specification and documentation here](https://blockstack.github.io/stacks-blockchain-sidecar/).
_Note: Using this API requires you to trust the server, but provides a faster onboarding experience. It also addresses performance issues for which querying a node itself would be too slow or difficult._
~> Note: Using this API requires you to trust the server, but provides a faster onboarding experience. It also addresses performance issues for which querying a node itself would be too slow or difficult
-> If you are looking for the Stacks 1.0 RPC endpoint references, please follow [this link](https://core.blockstack.org/).
-> If you are looking for the Stacks 1.0 RPC endpoint references, please follow [this link](https://core.blockstack.org/).
description: Learn how to set up a wallet via the CLI and send/receive STX on the Testnet.
---
---
# Send/Receive Stacks on Testnet
## Introduction
This quickstart guide will show you how to setup a Stacks wallet using the Blockstack JavaScript CLI and use it to send/receive Stacks tokens on Testnet. This wallet is intended for developer experimentation with Testnet only, do not use this wallet to store your tokens.
This quickstart guide will show you how to setup a Stacks wallet using the Blockstack JavaScript CLI and use it to
send/receive Stacks tokens on Testnet. This wallet is intended for developer experimentation with Testnet only, do not use this wallet to store your tokens.
description: Learn how to write a simple smart contract in the Clarity language.
description: Learn how to write a simple smart contract in the Clarity language.
experience: intermediate
experience: intermediate
duration: 30 minutes
duration: 30 minutes
@ -9,7 +10,7 @@ images:
sm: /images/pages/counter-tutorial-sm.svg
sm: /images/pages/counter-tutorial-sm.svg
---
---
# Counter smart contract
## Introduction
In this tutorial, you learn how to implement a smart contract that stores and manipulates an integer value on the Stacks 2.0 blockchain. By the end of this tutorial, you will ...
In this tutorial, you learn how to implement a smart contract that stores and manipulates an integer value on the Stacks 2.0 blockchain. By the end of this tutorial, you will ...
description: Get Started Writing Smart Contracts with Clarity
description: Learn the basics of Clarity and write a simple Hello World smart contract.
duration: 18 minutes
duration: 18 minutes
experience: beginners
experience: beginners
images:
images:
@ -8,9 +8,7 @@ images:
sm: /images/pages/hello-world-sm.svg
sm: /images/pages/hello-world-sm.svg
---
---
# Hello, World!
## Introduction
## Overview
In the world of smart contracts, everything is a blockchain transaction. You use tokens in your wallet to deploy a smart contract in a transaction, and each call to that contract after it's published is a transaction, too. That means that at each step, tokens are being exchanged as transaction fees. This tutorial introduces you to this mode of programming, which transforms blockchains into powerful state machines capable of executing complex logic.
In the world of smart contracts, everything is a blockchain transaction. You use tokens in your wallet to deploy a smart contract in a transaction, and each call to that contract after it's published is a transaction, too. That means that at each step, tokens are being exchanged as transaction fees. This tutorial introduces you to this mode of programming, which transforms blockchains into powerful state machines capable of executing complex logic.
@ -149,8 +147,6 @@ Locate the `(echo-number)` method, provide any integer for the `val` argument an
**Congratulations! You just deployed your smart contract and called a public function on the Testnet.**
**Congratulations! You just deployed your smart contract and called a public function on the Testnet.**
---
With the completion of this tutorial, you now:
With the completion of this tutorial, you now:
- Have a working Clarity starter project and local dev environment
- Have a working Clarity starter project and local dev environment
Clarity is a programming language for writing smart contracts on the Stacks 2.0 blockchain. It supports programmatic control over digital assets.
Clarity is a programming language for writing smart contracts on the Stacks 2.0 blockchain. It supports programmatic
control over digital assets.
## Smart contracts
## Smart contracts
Smart contracts encode and enforce rules for modifying a particular set of data that is shared among people and entities who don't necessarily trust each other. For example, a smart contract can hold funds in escrow until multiple parties agree to release them, create its own ledger and keep track of its own novel tokens (fungible or non-fungible), and even help make supply chains more transparent.
Smart contracts encode and enforce rules for modifying a particular set of data that is shared among people and entities
who don't necessarily trust each other. For example, a smart contract can hold funds in escrow until multiple parties
agree to release them, create its own ledger and keep track of its own novel tokens (fungible or non-fungible), and
even help make supply chains more transparent.
Because smart contracts are programs that exist in a blockchain, anyone can query them, and anyone can submit transactions to execute them. A smart contract execution can result in new transactions being written to the blockchain.
Because smart contracts are programs that exist in a blockchain, anyone can query them, and anyone can submit transactions
to execute them. A smart contract execution can result in new transactions being written to the blockchain.
Apps can take advantage of smart contracts to manage a global state that is visible to the public. Anyone can audit the blockchain in order to independently verify that an app's global shared state has been managed correctly according to the smart contract's rules.
Apps can take advantage of smart contracts to manage a global state that is visible to the public. Anyone can audit the
blockchain in order to independently verify that an app's global shared state has been managed correctly according to the smart contract's rules.
## Use cases
## Use cases
Not every decentralized application requires smart contracts, but Clarity unlocks interesting capabilities for decentralized applications. Examples of use cases include, but are not limited to:
Not every decentralized application requires smart contracts, but Clarity unlocks interesting capabilities for
decentralized applications. Examples of use cases include, but are not limited to:
- Access control (e.g. pay to access)
- Access control (e.g. pay to access)
- Non-fungible (e.g. collectibles) and fungible tokens (e.g. stablecoins)
- Non-fungible (e.g. collectibles) and fungible tokens (e.g. stablecoins)
@ -35,20 +42,29 @@ Clarity differs from most other smart contract languages in two essential ways:
- The language is interpreted and broadcast on the blockchain as is (not compiled)
- The language is interpreted and broadcast on the blockchain as is (not compiled)
- The language is decidable (not Turing complete)
- The language is decidable (not Turing complete)
Using an interpreted language ensures that the executed code is human-readable and auditable. A decidable language like Clarity makes it possible to determine precisely which code is going to be executed, for any function.
Using an interpreted language ensures that the executed code is human-readable and auditable. A decidable language
like Clarity makes it possible to determine precisely which code is going to be executed, for any function.
A Clarity smart contract is composed of two parts — a data space and a set of functions. Only the associated smart contract may modify its corresponding data space on the blockchain. Functions may be private and thus callable only from within the smart contract, or public and thus callable from other contracts. Users call smart contracts' public functions by broadcasting a transaction on the blockchain which invokes the public function. Contracts can also call public functions from other smart contracts.
A Clarity smart contract is composed of two parts — a data space and a set of functions. Only the associated
smart contract may modify its corresponding data space on the blockchain. Functions may be private and thus callable
only from within the smart contract, or public and thus callable from other contracts. Users call smart contracts'
public functions by broadcasting a transaction on the blockchain which invokes the public function. Contracts
can also call public functions from other smart contracts.
Note some of the key Clarity language rules and limitations.
Note some of the key Clarity language rules and limitations.
- The only primitive types are booleans, integers, buffers, and principals
- The only primitive types are booleans, integers, buffers, and principals
- Recursion is illegal and there are no anonymous functions.
- Recursion is illegal and there are no anonymous functions.
- Looping may only be performed via `map`, `filter`, or `fold`
- Looping may only be performed via `map`, `filter`, or `fold`
- There is support for lists, however, the only variable length lists in the language appear as function inputs; There is no support for list operations like append or join.
- There is support for lists, however, the only variable length lists in the language appear as function inputs;
There is no support for list operations like append or join.
- Variables are immutable.
- Variables are immutable.
## Learning Clarity
## Learning Clarity
The tutorials are ordered from "beginner" to "advanced." Start with the [Hello World tutorial](tutorial), then learn how to construct [a counter](tutorial-counter), and finally, learn how to [test your smart contracts](tutorial-test) using Mocha.
The tutorials are ordered from "beginner" to "advanced." Start with the [Hello World tutorial](/smart-contracts/hello-world-tutorial),
then learn how to construct [a counter](/smart-contracts/counter-tutorial), and finally, learn how to
[test your smart contracts](/smart-contracts/testing-contracts) using Mocha.
Once you've got the hang of the general workflow, environment, and language syntax, you should be ready to start writing contracts, referring to the [Clarity language reference](clarityRef) as you go.
Once you've got the hang of the general workflow, environment, and language syntax, you should be ready to start writing
contracts, referring to the [Clarity language reference](/references/clarity-language) as you go.
_Principals_ are a Clarity native type that represents an entity that can have a token balance. This section discusses principals and how they are used in the Clarity.
_Principals_ are a Clarity native type that represents an entity that can have a token balance. This section discusses principals and how they are used in the Clarity.
description: Run the latest builds of a Stacks Testnet node
icon: TestnetIcon
---
# Running a Testnet Node
# Running a Testnet Node
The Stacks 2.0 testnet is currently in development. As part of the testnet, you can run a node and connect it to a public network. This guide will walk you through downloading and running your own node in the testnet network.
The Stacks 2.0 testnet is currently in development. As part of the testnet, you can run a node and connect it to a public network. This guide will walk you through downloading and running your own node in the testnet network.
description: Learn to Test Clarity Contract Code with JavaScript and Mocha
description: Learn to Test Clarity Contract Code with JavaScript and Mocha.
experience: advanced
experience: advanced
duration: 15 minutes
duration: 15 minutes
---
---
# Testing Clarity code
## Introduction
## Overview
Clarity, Blockstack's smart contracting language, is based on [LISP](<https://en.wikipedia.org/wiki/Lisp_(programming_language)>). Clarity is an interpreted language, and [decidable](https://en.wikipedia.org/wiki/Recursive_language). In this tutorial, you will learn how to test Clarity and how use [Mocha](https://mochajs.org/) to test Clarity contracts while you develop them.
Clarity, Blockstack's smart contracting language, is based on [LISP](<https://en.wikipedia.org/wiki/Lisp_(programming_language)>). Clarity is an interpreted language, and [decidable](https://en.wikipedia.org/wiki/Recursive_language). In this tutorial, you will learn how to test Clarity and how use [Mocha](https://mochajs.org/) to test Clarity contracts while you develop them.
@ -3,7 +3,7 @@ title: Overview of the Atlas network
description: This document describes the Atlas network, a peer-to-peer content-addressed storage system whose chunks' hashes are announced on a public blockchain.
description: This document describes the Atlas network, a peer-to-peer content-addressed storage system whose chunks' hashes are announced on a public blockchain.
---
---
# Overview of the Atlas network
## Introduction
This document describes the Atlas network, a peer-to-peer content-addressed
This document describes the Atlas network, a peer-to-peer content-addressed
storage system whose chunks' hashes are announced on a public blockchain. Atlas
storage system whose chunks' hashes are announced on a public blockchain. Atlas
description: Step-by-step instructions for deploying a Blockstack API node on Debian or Ubuntu are below.
duration: 30 minutes
tags:
- tutorial
---
Step-by-step instructions for deploying a Blockstack API node on Debian or Ubuntu are below.
## Introduction
- **Step 1:** Make sure you have a Stacks Node running locally (see [instructions](https://github.com/blockstack/blockstack-core/blob/master/README.md#quick-start)).
- **Step 1:** Make sure you have a Stacks Node running locally (see [instructions](https://github.com/blockstack/blockstack-core/blob/master/README.md#quick-start)).
## I tried to login to CoinList with my AngelList account. Now, I can’t sign in. How do I access my account?
If you previously set up your CoinList account by logging in with your AngelList credentials and you are having issues signing into your account, you must create a separate password for Coinlist. To do this:
1. Go to <ahref="https://stackstoken.net/login"target="_blank">stackstoken.net</a>.
2. Select **Forgot your Password?**.
3. Enter the email associated with your AngelList account.
4. Select **Send recovery email**.
5. Locate the recovery email in your email software.
6. Use the instructions in the recovery email to create a unique password for your CoinList account.
Going forward, you can access your CoinList account by logging in with your email and new password.
This page describes how to use the Stacks Wallet software to manager your Stacks (STX) tokens. This page contains the following topics:
This page describes how to use the Stacks Wallet software to manager your Stacks (STX) tokens.
The Stacks Wallet software is installed on your computer, it is not a web application. You should have already [downloaded, verified, and installed the wallet software](wallet-install).
The Stacks Wallet software is installed on your computer, it is not a web application. You should have already [downloaded, verified, and installed the wallet software](wallet-install).
@ -270,8 +271,7 @@ They are maintained.
Once you reset the wallet, you have to start over from the _Terms of Use_. If
Once you reset the wallet, you have to start over from the _Terms of Use_. If
you do not restart the wallet, you can simple close it.
you do not restart the wallet, you can simple close it.
1. Click the <spanclass="uk-margin-small-center"uk-icon="cog"></span>
1. Click the settings icon in the upper right corner of the wallet.
(settings icon) in the upper right corner of the wallet.
The system opens the **Settings** dialog.
The system opens the **Settings** dialog.
@ -280,7 +280,7 @@ you do not restart the wallet, you can simple close it.
2. Select **Reset Wallet**.
2. Select **Reset Wallet**.
System asks for confirmation. If, for some reason, you want to stop the reset
System asks for confirmation. If, for some reason, you want to stop the reset
you would press <spanclass="uk-margin-small-center"uk-icon="close"></span> (right corner) or **Close**.
you would press close icon in the right corner or **Close**.
3. Select **Are you sure?** to complete the reset.
3. Select **Are you sure?** to complete the reset.
This teaches you how to run a Gaia storage hub on DigitalOcean (DO). DigitalOcean is an affordable and convenient cloud computing provider. This example uses DigitalOcean Spaces for file storage. A space is equivalent to AWS's S3 file storage solution.
This teaches you how to run a Gaia storage hub on DigitalOcean (DO). DigitalOcean is an affordable and convenient cloud computing provider. This example uses DigitalOcean Spaces for file storage. A space is equivalent to AWS's S3 file storage solution.
A Gaia service can run a simple administrative service co-located with your Gaia hub. This service allows you to administer the Gaia hub with the help of an API key. Gaia hubs installed using the Gaia Amazon Machine Image (AMI) have this service integrated automatically.
A Gaia service can run a simple administrative service co-located with your Gaia hub. This service allows you to administer the Gaia hub with the help of an API key. Gaia hubs installed using the Gaia Amazon Machine Image (AMI) have this service integrated automatically.
-> The functionality described in this tutorial has been deprecated with the Blockstack Browser. It will continue working only for apps that have not yet upgraded to Blockstack Connect.
-> The functionality described in this tutorial has been deprecated with the Blockstack Browser. It will continue working only for apps that have not yet upgraded to Blockstack Connect.