Overview of Stacks.js packages
mainStacks.js is a collection of JavaScript/TypeScript packages designed to provide the essential building blocks for interacting with the Stacks blockchain. The repository is organized into several functional modules:
Connecting Wallets
@stacks/connect: Used to connect web applications to Stacks wallet browser extensions (maintained in a separate repository).
Stacks Primitives
@stacks/transactions: For constructing and decoding transactions and working with Clarity smart contracts.@stacks/wallet-sdk: For building wallets, managing accounts, and handling keys.@stacks/storage: For storing and fetching files using Gaia (decentralized storage).@stacks/encryption: Provides encryption functions used across the Stacks.js ecosystem.@stacks/auth: For constructing and decoding authentication requests.@stacks/profile: For manipulating user profiles.@stacks/network: A library for interacting with Stacks blockchain nodes and APIs.@stacks/common: Shared utilities used by other packages.
Native Smart Contract Interaction
@stacks/bns: For interacting with the BNS (Bitcoin Name System) contract.@stacks/stacking: For interacting with Proof-of-Transfer (PoX) stacking.
Utilities and CLI
@stacks/cli: A command-line interface for interacting with auth, storage, and Stacks transactions.
Note: @stacks/keychain is deprecated and has been replaced by @stacks/wallet-sdk.