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
Let's install the
npm install @stacks/network
Full list of available packages
@stacks/connectConnect web application to Stacks wallet browser extensions.
@stacks/transactionsConstruct, decode transactions and work with Clarity smart contracts on the Stacks blockchain.
@stacks/wallet-sdkLibrary for building wallets, managing accounts, and handling keys for the Stacks blockchain.
@stacks/storageStore and fetch files with Gaia, the decentralized storage system.
@stacks/encryptionEncryption functions used by stacks.js packages.
@stacks/authConstruct and decode authentication requests for Stacks apps.
@stacks/profileFunctions for manipulating user profiles.
@stacks/networkNetwork and API library for working with Stacks blockchain nodes.
@stacks/commonCommon utilities used by stacks.js packages.
Native Smart Contract Interaction
@stacks/bnsLibrary for interacting with the BNS contract.
@stacks/stackingLibrary for PoX stacking.
The most commonly used packages are:
@stacks/connect— Stacks Connect, for building Stacks-ready web applications
@stacks/network— Network configuration (used together with other packages)
@stacks/transactions— Transaction construction, serialization, Clarity helpers, and more
@stacks/blockchain-api-client— Auto-generated API client (with websocket support) for all Stacks Blockchain API endpoints.