# get-starknet-core

> [![npm](https://img.shields.io/npm/v/get-starknet.svg)](https://www.npmjs.com/package/get-starknet)

Latest version **3.3.5** (published 2025-02-08) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install get-starknet-core
pnpm add get-starknet-core
yarn add get-starknet-core
bun add get-starknet-core
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.3.5 |
| Published | 2025-02-08 |
| First published | 2022-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 211.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bbrandtom, avimak, janek26 |
| Keywords | starknet, starkware, l2, zk, rollup, wallet, dapp |

## Links

- npm: https://www.npmjs.com/package/get-starknet-core
- npm.io page: https://npm.io/package/get-starknet-core

## Dependencies (1)

- [@module-federation/runtime](https://npm.io/package/@module-federation/runtime.md) ^0.1.2

## 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.3.5 (latest) — 2025-02-08
- 4.0.0 (next) — 2024-06-23
- 3.3.4 — 2024-10-17
- 3.3.3 — 2024-08-11
- 3.3.2 — 2024-07-09
- 3.3.1 — 2024-07-09
- 4.0.0-next.5 — 2024-04-25
- 3.3.0 — 2024-04-24
- 3.2.1 — 2024-04-24
- 4.0.0-next.4 — 2024-04-04
- 4.0.0-next.3 — 2024-03-26
- 4.0.0-next.2 — 2024-02-15
- 3.2.0 — 2023-08-07
- 3.1.0 — 2023-07-04
- 3.0.1 — 2023-06-21
- … 5 more at https://npm.io/package/get-starknet-core/versions

## README

# get-starknet

[![npm](https://img.shields.io/npm/v/get-starknet.svg)](https://www.npmjs.com/package/get-starknet)

## Goals

- ❤️‍🩹 Allow Starknet dApps and wallets to seamlessly connect
- 🪶 Lightweight and easy to use
- 🏎 Fast integration, building and testing
- ⚙️ Customizable and extensible
- 🌍 Open source and controlled by the community

## Installation

```
# using npm
npm install get-starknet starknet@next

# using yarn
yarn add get-starknet starknet@next

# using pnpm
pnpm add get-starknet starknet@next
```

## Usage for dApp developers

You can use the built-in UI to connect to any Starknet wallet as fast as
possible like this:

```tsx
import { connect, disconnect } from "get-starknet"

return <button onClick={() => connect()}>Connect wallet</button>
```

### Advanced usage

You can also choose to customize the UI by overwriting the CSS classes, or by
implementing your very own UI. This is possible due to a split into a `core` and
`ui` package. As a library author or dapp developer who wants to implement a
custom UI, you can use the `core` package.

```tsx
import {
  disconnect,
  enable,
  getAvailableWallets,
  getDiscoveryWallets,
  getLastConnectedWallet,
  getPreAuthorizedWallets,
} from "get-starknet-core"

interface GetStarknetResult {
  // Returns all wallets available in the window object
  getAvailableWallets: (
    options?: GetWalletOptions,
  ) => Promise<StarknetWindowObject[]>
  // Returns only preauthorized wallets available in the window object
  getPreAuthorizedWallets: (
    options?: GetWalletOptions,
  ) => Promise<StarknetWindowObject[]>
  // Returns all wallets in existence (from discovery file)
  getDiscoveryWallets: (options?: GetWalletOptions) => Promise<WalletProvider[]>
  // Returns the last wallet connected when it's still connected
  getLastConnectedWallet: () => Promise<StarknetWindowObject | null>
  // Connects to a wallet
  enable: (
    wallet: StarknetWindowObject,
    options?: {
      starknetVersion?: "v4" | "v5"
    },
  ) => Promise<ConnectedStarknetWindowObject>
  // Disconnects from a wallet
  disconnect: (options?: { clearLastWallet?: boolean }) => Promise<void>
}
```

## Development

You need Node and pnpm installed. Make sure to clone this repo and run:

```bash
pnpm install
pnpm build
```

To start watching for changes, run:

```bash
pnpm dev
```

and open `http://localhost:5173/`

### Running tests

For running tests:

```bash
pnpm test
```

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