Stacks.js

A JavaScript/TypeScript SDK for building applications on the Stacks blockchain.

Overview

Stacks.js is a collection of JavaScript libraries that enable you to build web applications on the Stacks blockchain. From wallet authentication to smart contract interactions.

To explore Stacks.js with AI, copy and paste llms.txt into your LLM of choice.

Key features

  • Transaction construction - Build and broadcast all transaction types with type-safe APIs
  • Smart contract interaction - Deploy contracts and call functions with automatic encoding
  • Wallet integration - Connect to Leather, Xverse, and other Stacks wallets seamlessly
  • Post-conditions - Protect users with built-in asset transfer validations

Installation

Stacks.js is separated into focused packages published under the @stacks scope. Install only what you need:

Terminal
$
npm install @stacks/transactions

Next steps

Need help building with Stacks.js?

Reach out to us on the #stacks-js channel on Discord under the Hiro Developer Tools section. There's also a weekly office hours call every Wednesday at 1pm ET.

How is this guide?