Skip to main content

Installing Stacks.js Packages

Stacks.js is separated into many smaller packages, which can be installed individually. Most packages are published to npm under the @stacks scope.

Let's install the @stacks/network package:

npm install @stacks/network

Packages

Full list of available packages

Connecting Wallets

  • @stacks/connect Connect web application to Stacks wallet browser extensions.

Stacks Primitives

  • @stacks/transactions Construct, decode transactions and work with Clarity smart contracts on the Stacks blockchain.
  • @stacks/wallet-sdk Library for building wallets, managing accounts, and handling keys for the Stacks blockchain.
  • @stacks/storage Store and fetch files with Gaia, the decentralized storage system.
  • @stacks/encryption Encryption functions used by stacks.js packages.
  • @stacks/auth Construct and decode authentication requests for Stacks apps.
  • @stacks/profile Functions for manipulating user profiles.
  • @stacks/network Network and API library for working with Stacks blockchain nodes.
  • @stacks/common Common utilities used by stacks.js packages.

Native Smart Contract Interaction

Others

  • @stacks/cli Command line interface to interact with auth, storage, and Stacks transactions.
  • @stacks/blockchain-api-client Auto-generated REST and websocket API for all endpoints provided by the Stacks Blockchain API.
  • @stacks/keychain DEPRECATED, replaced by @stacks/wallet-sdk

The most commonly used packages are:

The source-code for most packages live in the Stacks.js monorepo or the Stacks Connect monorepo on GitHub.