STACKS.JS

DECENTRALIZED APP DEVELOPMENT MADE EASY

A collection of JavaScript libraries for web apps on Stacks.
npm install @stacks/network
tag icontag icontag icontag icontag iconicon tagicon tag
Plus IconPlus IconPlus IconPlus Icon
Watch Quick Tour Video (04:30)
Stacks.js libraries handle basic functions like broadcasting transactions, authenticating users, and signing messages. Why reinvent the wheel when you can just use Stacks.js?

All your core functions in one place.

icon tagicon tag

Authenticate your users

Connect to user wallets and verify their on-chain identity.

icon tagimage

Sign messages

Prompt users to sign arbitrary messages, which can authorize an in-app action or prove they control a particular address.

imageimage

Sign transactions

Enable your users to interact with smart contracts through your app.

Quote Icon

/** Stacks.js is the building block that we use all the time to build, broadcast, and sign our transactions. */

FEATURES

Take advantage of what Stacks has to offer.

check icon

Create post conditions

Stacks.js also enables you to create new post conditions, a unique safety feature of Stacks. Post conditions are requirements a smart contract transaction needs to meet in order to execute (otherwise it will abort). Those requirements could be a minimum/maximum transfer amount from the sender, what the receiver will send back in return, and more.

b icon

Integrate Stacking

Stacks.js also offers a package for you to easily integrate stacking into your app. Stacking is how users can participate in Stacks’ consensus mechanism and earn BTC rewards. You can use Stacks.js to display stacking data in your app, verify users’ stacker eligibility, and even enable them to lock STX in stacking.