> For the complete documentation index, see [llms.txt](https://docs.stacks.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacks.co/stacks.js/overview.md).

# Overview

<div data-with-frame="true"><figure><img src="https://284917788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZz9BLmTU9oydDpL3qiUh%2Fuploads%2Fgit-blob-62cf4ac9cd02135ce49684f743cb8d0cd885f409%2Fstacksjs-learn.png?alt=media" alt=""><figcaption></figcaption></figure></div>

{% hint style="success" %}
For the latest releases and versions of Stacks.js packages, check out its open-source repo [here](https://github.com/stx-labs/stacks.js).
{% endhint %}

## Overview

Stacks.js is a comprehensive collection of JavaScript libraries designed to empower developers in creating sophisticated web applications on the Stacks network. These libraries facilitate a wide range of functionalities, from seamless wallet authentication to robust interactions with smart contracts. By leveraging Stacks.js, developers can efficiently build decentralized applications (dApps) that harness the full potential of the Stacks ecosystem.

## 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:

{% tabs %}
{% tab title="Transactions" %}
{% code title="terminal" %}

```bash
npm install @stacks/transactions
```

{% endcode %}
{% endtab %}

{% tab title="Wallet Connections" %}
{% code title="terminal" %}

```bash
npm install @stacks/connect
```

{% endcode %}
{% endtab %}

{% tab title="Network Config" %}
{% code title="terminal" %}

```bash
npm install @stacks/network
```

{% endcode %}
{% endtab %}

{% tab title="Common Utils" %}
{% code title="terminal" %}

```bash
npm install @stacks/common
```

{% endcode %}
{% endtab %}
{% endtabs %}

Other available packages include:

* `@stacks/auth`
* `@stacks/encryption`
* `@stacks/network`
* `@stacks/stacking`
* `@stacks/transactions`
* `@stacks/bns`
* `@stacks/common`
* `@stacks/wallet-sdk`

***

{% hint style="info" %}
Need help building with Stacks.js?

Reach out to us on the **#stacks-js** channel on [Discord](https://stacks.chat/) under the Developer Tools section.
{% endhint %}

***

### Additional Resources

* \[[stacks.js.org](https://stacks.js.org/)] For a complete exhaustive list of definitions on types, methods, classes, & etc.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stacks.co/stacks.js/overview.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
