> ## Documentation Index
> Fetch the complete documentation index at: https://starkware-9575960b-starkzapv4.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install Starkzap and its dependencies

## Installation

Install Starkzap using npm or yarn:

```bash theme={null}
npm install starkzap
```

or

```bash theme={null}
yarn add starkzap
```

<Info>
  Building for React Native/Expo? Use [React Native Integration](/build/starkzap/react-native) and install `starkzap-native` instead of using `starkzap` directly in your mobile app.
</Info>

### Dependencies

The SDK depends on:

* [`starknet`](https://www.npmjs.com/package/starknet) (v10+) - Starknet.js core library
* `@starknet-io/starknet-types-0103` - RPC spec 0.10.3 type declarations, referenced by Starkzap's published types

Both are installed automatically when you install `starkzap`.

#### Peer dependencies by feature

All peer dependencies are **optional** to keep the package lean. Install only what you need:

| Feature | Included in | Peer Dependencies |
| - | - | - |
| **Ethereum bridging** (deposit / withdraw to Ethereum) | `starkzap`,<br />`starkzap-native` | `ethers@^6.16.0` |
| **Solana bridging** (deposit / withdraw to Solana via Hyperlane) | `starkzap`,<br />`starkzap-native` | `@solana/web3.js@^1.98.4`, `@hyperlane-xyz/sdk@^14.4.0`, `@hyperlane-xyz/registry@^19.4.0`, `@hyperlane-xyz/utils@^14.4.0` |
| **Cartridge Controller wallet** (web-only) | `starkzap` | `@cartridge/controller@^0.13.13` |
| **AVNU swaps & DCA** (`AvnuSwapProvider`, `AvnuDcaProvider`) | `starkzap`,<br />`starkzap-native` | `@avnu/avnu-sdk@^4.2.0` |
| **Tongo confidential transfers** | `starkzap`,<br />`starkzap-native` | `@fatsolutions/tongo-sdk@^1.5.0` |
| **STRK20 privacy pool** | `starkzap`,<br />`starkzap-native` | `@starkware-libs/starknet-privacy-sdk@^0.14.3-rc.5` — see [the extra setup below](#strk20-privacy-pool) |
| **React Native / Expo** | `starkzap-native` | `react-native-get-random-values@^1.11.0`, `fast-text-encoding@^1.0.6`, `@ethersproject/shims@^5.7.0`, `buffer@^6.0.3` |

<Note>
  Two features are reached through their own entry points rather than the package root: **Cartridge** from `starkzap/cartridge`, and the **STRK20 privacy pool** from `starkzap/privacy` (`starkzap-native/privacy` on React Native). Their types name the optional peer, and carrying them on the root entry would make that peer mandatory for everyone — so the subpath is what keeps it optional. Everything else, bridging and Tongo included, imports from the root.
</Note>

<Note>
  These are the ranges Starkzap declares as peer dependencies. Installing an older minor within the same major (`ethers@6.0.0`, say) satisfies the docs but not the peer range, and npm reports a conflict — so install at least the versions listed.
</Note>

```bash theme={null}
# Ethereum bridging
npm install ethers

# Solana bridging
npm install @solana/web3.js @hyperlane-xyz/sdk @hyperlane-xyz/registry @hyperlane-xyz/utils

# Cartridge Controller (only for Web)
npm install @cartridge/controller

# AVNU swaps & DCA (only needed for AvnuSwapProvider / AvnuDcaProvider; Ekubo needs nothing extra)
npm install @avnu/avnu-sdk

# Tongo confidential transfers
npm install @fatsolutions/tongo-sdk

# React Native / Expo (use starkzap-native instead of starkzap)
npm install starkzap-native react-native-get-random-values fast-text-encoding @ethersproject/shims buffer
```

#### STRK20 privacy pool

The privacy SDK is not on npm, so it needs two extra steps before `npm install` works.

<Warning>
  Installing the SDK is not enough to deposit. Deposit screening runs through Elliptic under a StarkWare API key, so the proving service that performs it is not public — contact StarkWare for deposit access. Transfers, withdrawals, and the discovery service can be self-hosted. See [STRK20 privacy pool](/build/starkzap/privacy/strk20).
</Warning>

Point the `@starkware-libs` scope at GitHub Packages in your project's `.npmrc`:

```txt theme={null}
@starkware-libs:registry=https://npm.pkg.github.com
```

Reads require authentication even though the package is public. Put a token with `read:packages` in your **`~/.npmrc`**, never in the committed project file:

```txt theme={null}
//npm.pkg.github.com/:_authToken=YOUR_TOKEN
```

Then install:

```bash theme={null}
# STRK20 privacy pool (requires Node 24+)
npm install @starkware-libs/starknet-privacy-sdk
```

<Note>
  Node 24 or later is required for the WebCrypto APIs the OHTTP transport relies on. This is not enforced by the installer, so an older Node fails at runtime rather than at install time.
</Note>

## Next Steps

Once installed, configure the SDK:

1. Set up [Configuration](/build/starkzap/configuration) for networks, RPC providers, and optional features
2. If you are building a mobile app, follow [React Native Integration](/build/starkzap/react-native) for `starkzap-native` + Metro setup
3. Then check out the [Quick Start Guide](/build/starkzap/quick-start) to get your first wallet integration working in minutes


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.