# @dfinity/identity

> JavaScript and TypeScript library to manage identity with the Internet Computer

Latest version **3.4.3** (published 2025-11-19) · Apache-2.0 license · 0 weekly downloads

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

## Install

```sh
npm install @dfinity/identity
pnpm add @dfinity/identity
yarn add @dfinity/identity
bun add @dfinity/identity
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.4.3 |
| Published | 2025-11-19 |
| First published | 2021-04-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 203.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 171 |
| Author | DFINITY Stiftung |
| Maintainers | dayyildiz, npm-dfinity-org, bitdivine, ielashi, keplervital, dfn_wndlng, dfn-it-owner, g.perez |
| Keywords | internet computer, ic, dfinity, canister, webauthn, identity, principal, authentication, dfx, motoko, javascript, typescript, blockchain, crypto, distributed, api |

## Links

- npm: https://www.npmjs.com/package/@dfinity/identity
- Repository: https://github.com/dfinity/icp-js-core
- Homepage: https://js.icp.build/core/v3.2/libs/identity
- Issues: https://github.com/dfinity/icp-js-core/issues
- npm.io page: https://npm.io/package/@dfinity/identity

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 3.4.3 (latest) — 2025-11-19
- 3.2.0-beta.0 (beta) — 2025-07-31
- 0.19.3-react-native (react-native) — 2023-11-09
- 3.4.2 — 2025-11-10
- 3.4.1 — 2025-10-24
- 3.4.0 — 2025-10-22
- 3.3.1 — 2025-10-21
- 3.3.0 — 2025-10-13
- 3.2.7 — 2025-09-30
- 3.2.6 — 2025-09-18
- 3.2.5 — 2025-09-16
- 3.2.4 — 2025-09-02
- 3.2.3 — 2025-08-27
- 3.2.2 — 2025-08-21
- 3.2.1 — 2025-08-13
- … 92 more at https://npm.io/package/@dfinity/identity/versions

## README

# @icp-sdk/core/identity

JavaScript and TypeScript module to manage Identities and enable simple Web Authentication flows for applications on the [Internet Computer](https://internetcomputer.org/)

## Usage

```ts
import { ECDSAKeyIdentity, Ed25519KeyIdentity, WebAuthnIdentity } from '@icp-sdk/core/identity';

const ecdsaIdentity = await ECDSAKeyIdentity.generate();
const ed25519Identity = Ed25519KeyIdentity.generate();
const webAuthnIdentity = await WebAuthnIdentity.create();
```

### DelegationIdentity

The `DelegationIdentity` is typically generated using the [@dfinity/auth-client](https://npmjs.com/package/@dfinity/auth-client) package.

### PartialIdentity

The `PartialIdentity` is not typically used directly, but is used by the `DelegationIdentity` and `WebAuthnIdentity` classes.

### Secp256k1KeyIdentity

See [@icp-sdk/core/identity/secp256k1](https://js.icp.build/core/latest/libs/identity-secp256k1/api/) for more information.

## In Node.js

Depending on your version, you may need to use a polyfill and set `global.crypto` in a setup file. If you prefer, you can also pass in a `subtleCrypto` implementation in methods that call for it, either as a direct argument, or in a `cryptoOptions` object.

## API Reference

Additional API Documentation can be found [here](https://js.icp.build/core/latest/libs/identity/api/).

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