# @near-js/crypto

> Abstractions around NEAR-compatible elliptical curves and cryptographic keys

Latest version **2.5.1** (published 2025-11-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install @near-js/crypto
pnpm add @near-js/crypto
yarn add @near-js/crypto
bun add @near-js/crypto
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.5.1 |
| Published | 2025-11-06 |
| First published | 2023-03-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 42 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | nearndy, frol, nearmorgan |

## Links

- npm: https://www.npmjs.com/package/@near-js/crypto
- npm.io page: https://npm.io/package/@near-js/crypto

## Dependencies (6)

- [borsh](https://npm.io/package/borsh.md) 1.0.0
- [secp256k1](https://npm.io/package/secp256k1.md) 5.0.1
- [@noble/curves](https://npm.io/package/@noble/curves.md) 1.8.1
- [@noble/hashes](https://npm.io/package/@noble/hashes.md) ^1.7.1
- [@near-js/types](https://npm.io/package/@near-js/types.md) 2.5.1
- [@near-js/utils](https://npm.io/package/@near-js/utils.md) 2.5.1

## Recent versions

- 2.5.1 (latest) — 2025-11-06
- 1.4.0-next.15 (next) — 2024-08-28
- 2.5.0 — 2025-11-03
- 2.4.1 — 2025-11-03
- 2.4.0 — 2025-10-26
- 2.3.4 — 2025-10-16
- 2.3.3 — 2025-10-01
- 2.3.2 — 2025-09-24
- 2.3.1 — 2025-09-10
- 2.3.0 — 2025-09-03
- 2.2.6 — 2025-08-26
- 2.2.5 — 2025-08-06
- 2.2.4 — 2025-07-24
- 2.2.3 — 2025-07-21
- 2.2.2 — 2025-07-09
- … 38 more at https://npm.io/package/@near-js/crypto/versions

## README

# @near-js/crypto

A collection of classes and types for working with cryptographic key pairs.

## Modules

- [PublicKey](https://github.com/near/near-api-js/blob/master/packages/crypto/src/public_key.ts) representation of a public key capable of verifying signatures
- [KeyPairBase](https://github.com/near/near-api-js/blob/master/packages/crypto/src/key_pair_base.ts) abstract class representing a key pair
- [KeyPair](https://github.com/near/near-api-js/blob/master/packages/crypto/src/key_pair.ts) abstract extension of `KeyPairBase` with static methods for parsing and generating key pairs
- [KeyPairEd25519](https://github.com/near/near-api-js/blob/master/packages/crypto/src/key_pair_ed25519.ts) implementation of `KeyPairBase` using [Ed25519](https://en.wikipedia.org/wiki/EdDSA#Ed25519)
- [Constants](https://github.com/near/near-api-js/blob/master/packages/crypto/src/constants.ts) keypair-specific constants

# License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See [LICENSE](https://github.com/near/near-api-js/blob/master/LICENSE) and [LICENSE-APACHE](https://github.com/near/near-api-js/blob/master/LICENSE-APACHE) for details.

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