# starknetkit

Latest version **3.4.3** (published 2026-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install starknetkit
pnpm add starknetkit
yarn add starknetkit
bun add starknetkit
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.4.3 |
| Published | 2026-01-06 |
| First published | 2023-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 17 |
| Unpacked size | 2.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 32 |
| Maintainers | gergold |
| Keywords | starknet, starkware, l2, zk, rollup, wallet, dapp |

## Links

- npm: https://www.npmjs.com/package/starknetkit
- Repository: https://github.com/argentlabs/starknetkit
- Homepage: https://github.com/argentlabs/starknetkit#readme
- Issues: https://github.com/argentlabs/starknetkit/issues
- npm.io page: https://npm.io/package/starknetkit

## Dependencies (17)

- [react](https://npm.io/package/react.md) ^18.2.0
- [bowser](https://npm.io/package/bowser.md) ^2.11.0
- [events](https://npm.io/package/events.md) ^3.3.0
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [@argent/x-ui](https://npm.io/package/@argent/x-ui.md) ^1.109.0
- [@trpc/client](https://npm.io/package/@trpc/client.md) ^10.38.1
- [@trpc/server](https://npm.io/package/@trpc/server.md) ^10.38.1
- [svelte-forms](https://npm.io/package/svelte-forms.md) ^2.3.1
- [trpc-browser](https://npm.io/package/trpc-browser.md) ^1.3.2
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^5.0.1
- [detect-browser](https://npm.io/package/detect-browser.md) ^5.3.0
- [@cartridge/controller](https://npm.io/package/@cartridge/controller.md) ^0.10.0
- [@starknet-io/types-js](https://npm.io/package/@starknet-io/types-js.md) 0.8.4
- [@starknet-io/get-starknet](https://npm.io/package/@starknet-io/get-starknet.md) ^4.0.8
- [@walletconnect/sign-client](https://npm.io/package/@walletconnect/sign-client.md) ^2.11.0
- [@starknet-io/get-starknet-core](https://npm.io/package/@starknet-io/get-starknet-core.md) ^4.0.8

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 3.4.3 (latest) — 2026-01-06
- 4.0.0 (next) — 2026-11-10
- 3.2.0-beta.1 (beta) — 2025-10-06
- 2.10.5-beta-connect-silent.2 (beta-connect-silent) — 2025-05-02
- 2.10.0-beta-argent-ww-iframe.1 (beta-argent-ww-iframe) — 2025-03-18
- 2.8.1-beta-wallet-account.1 (beta-wallet-account) — 2025-03-12
- 2.8.0-beta-ww-sdk.1 (beta-ww-sdk) — 2025-03-04
- 2.6.3-beta-trpc-link.1 (beta-trpc-link) — 2024-12-19
- 2.4.0-beta-braavos-mobile.1 (beta-braavos-mobile) — 2024-11-05
- 3.4.2 — 2025-12-24
- 3.4.1 — 2025-12-23
- 3.4.0 — 2025-11-21
- 3.3.0 — 2025-10-13
- 3.2.0 — 2025-10-07
- 3.1.3 — 2025-10-06
- … 142 more at https://npm.io/package/starknetkit/versions

## README

<!-- logo -->
<p align="center">
  <img width='300' src="https://starknetkit-website-git-blo-1541-argentlabs.vercel.app/starknetKit-logo.svg">
</p>

<!-- primary badges -->
<p align="center">
  <a href="https://www.npmjs.com/package/starknetkit">
    <img src='https://img.shields.io/npm/v/starknetkit' />
  </a>
  <a href="https://bundlephobia.com/package/starknetkit">
    <img src='https://img.shields.io/bundlephobia/minzip/starknet?color=success&label=size' />
  </a>
  <a href="https://www.npmjs.com/package/starknetkit">
    <img src='https://img.shields.io/npm/dt/starknetkit?color=blueviolet' />
  </a>
  <a href="https://github.com/argentlabs/starknetkit/blob/main/LICENSE/">
    <img src="https://img.shields.io/badge/license-MIT-black">
  </a>
</p>

## 🕹️ StarknetKit

Install starknetkit with `npm` or `yarn`

```bash
# latest official release (main branch)
$ npm install starknetkit

# or with yarn:
$ yarn add starknetkit
```

## Imports

After installation, we get access to different methods, such as `connect`, `disconnect`, etc which we should import for use in our application:

```js
import { connect, disconnect } from "starknetkit"
```

## Establishing a connection

To establish a wallet connection, we need to call the connect method which was imported earlier like this:

```js
const wallet = await connect()
```

By default, the list of connectors is:

- Ready Wallet
- Braavos
- Ready (formerly Argent)
- Web Wallet

## Connect with specific connectors

```js
const webwallet = await connect([new WebWalletConnector()])

const argentMobileWallet = await connect([
  new ArgentMobileConnector()
])

const wallet = await connect([
  new InjectedConnector({ options: { id: "argentX" } }),
  new InjectedConnector({ options: { id: "braavos" } })
])
```

## Reconnect to a previously connected wallet on load:

```js
const wallet = await connect({ modalMode: "neverAsk" })
```

## Disconnect a wallet

```js
await disconnect({ clearLastWallet: true })
```

## Handle webwallet logout

In your application, import `handleWebwalletLogoutEvent` and pass a callback to manage the state of your dapp

```js
useEffect(() => {
  handleWebwalletLogoutEvent(() => {
    // clear state
  })
}, [])
```

## Listen to account change

```js
const selectedConnectorWallet = getSelectedConnectorWallet()
selectedConnectorWallet.on("accountsChanged", () => {
  setWallet(prevState => {
    const updatedWallet = { ...prevState }
    updatedWallet.account = selectedConnectorWallet.account
    return updatedWallet
  })
})
```

## 📕 Guides

Guides can be found [here](https://www.starknetkit.com/docs)

## ✏️ Contributing

If you consider to contribute to this project please read [CONTRIBUTING.md](./CONTRIBUTING.md) first.

## 📜 License

Copyright (c) 2023

Licensed under the [MIT license](./LICENSE.md).

---
_Source: https://npm.io/package/starknetkit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
