# @privy-io/js-sdk-core

> Vanilla JS client for the Privy Auth API

Latest version **0.81.0** (published 2026-11-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @privy-io/js-sdk-core
pnpm add @privy-io/js-sdk-core
yarn add @privy-io/js-sdk-core
bun add @privy-io/js-sdk-core
```

## Health

**Score 70/100 (B)** — status: active.

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.81.0 |
| Published | 2026-11-24 |
| First published | 2023-09-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 16 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | privy.io |
| Maintainers | payton-privy, sternhenri, asta-li, ahollenbach, ankushswar1, joshnaviprivy, ajin-privy, andrewprivyadmin |
| Keywords | authentication, authorization, identity, privacy, privy, user data, web3 |

## Links

- npm: https://www.npmjs.com/package/@privy-io/js-sdk-core
- npm.io page: https://npm.io/package/@privy-io/js-sdk-core

## Dependencies (16)

- [jose](https://npm.io/package/jose.md) ^4.15.5
- [js-cookie](https://npm.io/package/js-cookie.md) ^3.0.5
- [@scure/base](https://npm.io/package/@scure/base.md) ^1.2.6
- [fetch-retry](https://npm.io/package/fetch-retry.md) ^6.0.0
- [canonicalize](https://npm.io/package/canonicalize.md) ^2.0.0
- [@privy-io/std](https://npm.io/package/@privy-io/std.md) 0.0.2
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^5.0.1
- [@privy-io/chains](https://npm.io/package/@privy-io/chains.md) 1.0.0
- [@privy-io/routes](https://npm.io/package/@privy-io/routes.md) 0.5.3
- [libphonenumber-js](https://npm.io/package/libphonenumber-js.md) ^1.12.10
- [set-cookie-parser](https://npm.io/package/set-cookie-parser.md) ^2.6.0
- [@privy-io/api-base](https://npm.io/package/@privy-io/api-base.md) 2.1.1
- [@privy-io/encoding](https://npm.io/package/@privy-io/encoding.md) 0.4.0
- [@privy-io/ethereum](https://npm.io/package/@privy-io/ethereum.md) 0.2.7
- [@privy-io/api-types](https://npm.io/package/@privy-io/api-types.md) 0.25.0
- [@privy-io/are-addresses-equal](https://npm.io/package/@privy-io/are-addresses-equal.md) 0.0.18

## Alternatives

- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads
- [escher-request](https://npm.io/package/escher-request.md) — 545 weekly downloads

## Recent versions

- 0.81.0 (latest) — 2026-11-24
- 0.73.1-snapshot-20260904210808 (snapshot) — 2026-09-04
- 0.72.1-beta-20260828180615 (beta) — 2026-08-28
- 0.23.3-alpha-20240702142511 (alpha) — 2024-07-02
- 0.80.0 — 2026-11-17
- 0.79.5 — 2026-11-12
- 0.79.4 — 2026-11-05
- 0.79.3 — 2026-11-04
- 0.79.2 — 2026-11-03
- 0.79.1 — 2026-10-21
- 0.79.0 — 2026-10-16
- 0.78.4 — 2026-10-15
- 0.78.3 — 2026-10-13
- 0.78.2 — 2026-10-09
- 0.78.1 — 2026-10-07
- … 994 more at https://npm.io/package/@privy-io/js-sdk-core/versions

## README

# @privy-io/js-sdk-core

> 🔧 The Privy JS SDK is a low-level library and **not intended for general consumption.**
>
> **Before building, please reach out to the Privy team** to discuss your project and which Privy SDK options may be better suited to it.

## Usage

### Auth

```tsx
const privy = new Privy({appId: '<your-app-id-here>'});

await privy.auth.sms.sendCode('+1 555 555 5555');
const {user} = await privy.auth.sms.loginWithCode('+1 555 555 5555', '123123');
```

### Embedded Wallets

```tsx
// Or use the embedded wallet with viem
import {createWalletClient, custom} from 'viem';

// Initialize the client
const privy = new Privy({appId: '<your-app-id-here>'});

// Log in
await privy.auth.sms.sendCode('+1 555 555 5555');
const {user} = await privy.auth.sms.loginWithCode('+1 555 555 5555', '123123');

// Create an embedded wallet
const wallet = await privy.embeddedWallet.create();

// Use the embedded wallet
const accounts = await wallet.request({method: 'eth_requestAccounts'});
const response = await wallet.request({
  method: 'eth_sendTransaction',
  params: [
    {
      from: accounts[0],
      to: '0x0000000000000000000000000000000000000000',
      value: '1',
    },
  ],
});

// create a viem client from the privy embedded wallet
const viemWalletClient = createWalletClient({
  chain: mainnet,
  transport: custom(wallet),
});

// use viem to sign a message
await viemWalletClient.signMessage({
  message: 'Hello from Privy!!',
  account: wallet.address,
});
```

## Changelog

Our [changelog](https://docs.privy.io/changelogs/js-sdk-core) contains the latest information about new releases, including features, fixes, and upcoming changes.

We use [Semantic Versioning](https://semver.org/) to track changes.

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