Docs
Overview

Overview

micro-stacks is an all-in-one TypeScript SDK for interacting with the Stacks ecosystem. With micro-stacks you can build software that can: interact with Clarity, the smart contract langauge on Stacks, build apps that interact with Stacks based wallets, construct transactions, post conditions, and more!



⚡ Quick start
pnpm i @micro-stacks/react@beta
Read the getting started guide
Create a server-side rendered Stacks app with Remix

Building apps

Check out these core patterns for building robust Stacks applications.


🚀 Get started
Learn how to add micro-stacks to any JavaScript based project.
Build an app
✨ Connect a Stacks wallet
Learn how to add web3 authentication to any JavaScript application or service.
Add authentication
💰 Sign transactions
Learn about the different types of transactions and how to have your users sign them.
Learn about transactions
📝 Message signing
Learn about message signatures and SIP-018 structured data signing.
Sign messages
🔒 Working with post conditions
Learn how to construct post-conditions to protect your users from accidental asset-loss.
Learn more

Available libraries

These are the packages you can use:

  • React: if you're building a Vue app, use this.
  • Svelte: if you're building a Svelte app, use this (coming soon).
  • Vue: if you're building a Vue app, use this (coming soon).
  • Client: if you're building a non-react app, use this.
  • Core: if you're building something lower level, use this.

Here is a handy table to understand which library to use:

Use caseModule to use
Building a react based appReact: @micro-stacks/react
Building a svelte appClient module: @micro-stacks/svelte (coming soon)
Building a vue appClient module: @micro-stacks/vue (coming soon)
Building an angular appClient module: @micro-stacks/client
Handling Stacks user sessions in vanilla javascriptClient module: @micro-stacks/client
Working with Clarity valuesCore module: micro-stacks/clarity
Constructing transactions in node.jsCore module: micro-stacks/transactions
Converting values to and from byte arraysCore module: micro-stacks/common

Core modules

At the foundation of all this tooling is the base library, micro-stacks. This library contains the lowest level code which all other packages make use of. Most developers will likely interact with packages higher up in this stack, such as the Client module or React specific tooling. The core modules are: Clarity, Connect, Crypto, Network, Storage, and Transactions.

Use these modules if you're parsing Clarity values, interacting with buffers (byte arrays), or building lower-level functionality.

Client module

The Client module is what any kind of Stacks based app is likely going to use to add Stacks-specific functionality. This means if you are going to have your users sign messages or transactions, save data, or encrypt data, and you are not building a React based application, the Client module is what you want to use. If you are building a React application, you should check out the React tooling docs.

Use this module if you are handling Stacks user session and not building a React app.

React

The React library offers many quality of life and developer experience improvements over using either the Client module or the Core modules by themselves. The React library exports many different hooks and components that make building Stacks apps fun and easy.

Use this module if you are building a React-based Stacks app.