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, Stacks.js provides the essential building blocks for creating decentralized applications.

Key features

  • Wallet integration - Connect to Leather, Xverse, and other Stacks wallets seamlessly
  • Transaction construction - Build and broadcast all transaction types with type-safe APIs
  • Smart contract interaction - Deploy contracts and call functions with automatic encoding
  • Post-condition safety - Protect users with built-in asset transfer validations
  • Network flexibility - Switch between mainnet, testnet, and local development
  • TypeScript support - Full type definitions for enhanced developer experience

Installation

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

Build Stacks-ready web apps and connect to user wallets.

Terminal
$
npm install @stacks/connect

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.