# @solana/assertions

> Helpers for asserting that a JavaScript environment supports certain features necessary for the operation of the Solana JavaScript SDK

Latest version **8.3.0** (published 2026-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @solana/assertions
pnpm add @solana/assertions
yarn add @solana/assertions
bun add @solana/assertions
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.3.0 |
| Published | 2026-09-09 |
| First published | 2023-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.18.0 |
| Dependencies | 1 |
| Unpacked size | 60.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 695 |
| Author | Solana Labs Maintainers |
| Maintainers | solana-devs |
| Keywords | blockchain, solana, web3 |

## Links

- npm: https://www.npmjs.com/package/@solana/assertions
- Repository: https://github.com/anza-xyz/kit
- Homepage: https://www.solanakit.com/api#solanaassertions
- Issues: https://github.com/anza-xyz/kit/issues
- npm.io page: https://npm.io/package/@solana/assertions

## Dependencies (1)

- [@solana/errors](https://npm.io/package/@solana/errors.md) 8.3.0

## Recent versions

- 8.3.0 (latest) — 2026-09-09
- 8.3.0-canary-20260909095052 (canary) — 2026-09-09
- 5.1.0-experimental-20251205104522 (experimental) — 2025-12-05
- 4.0.0 (4x) — 2025-10-08
- 3.0.3 (3x) — 2025-09-11
- 2.0.0 (next) — 2024-11-07
- 2.0.0-rc.4 (rc) — 2024-11-05
- 2.0.0-preview.4.20240731091009.c2717fc498afa3228c8f8b01600a575989afae99 (preview) — 2024-07-31
- 2.0.0-preview.4 (tp4) — 2024-07-02
- 2.0.0-preview.3 (tp3) — 2024-04-25
- 2.0.0-preview.2 (tp2) — 2024-03-19
- 8.3.0-canary-20260909094827 — 2026-09-09
- 8.3.0-canary-20260909093427 — 2026-09-09
- 8.3.0-canary-20260909093407 — 2026-09-09
- 8.3.0-canary-20260909092549 — 2026-09-09
- … 2378 more at https://npm.io/package/@solana/assertions/versions

## README

[![npm][npm-image]][npm-url]
[![npm-downloads][npm-downloads-image]][npm-url]
<br />
[![code-style-prettier][code-style-prettier-image]][code-style-prettier-url]

[code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
[code-style-prettier-url]: https://github.com/prettier/prettier
[npm-downloads-image]: https://img.shields.io/npm/dm/@solana/assertions?style=flat
[npm-image]: https://img.shields.io/npm/v/@solana/assertions?style=flat
[npm-url]: https://www.npmjs.com/package/@solana/assertions

# @solana/assertions

This package contains utilities for asserting that a JavaScript environment supports certain features necessary for the operation of the Solana JavaScript SDK.

## Functions

`assertDigestCapabilityIsAvailable()`

Throws an exception unless `crypto.subtle.digest()` is available in the current JavaScript environment.

`assertKeyExporterIsAvailable()`

Throws an exception unless `crypto.subtle.exportKey()` is available in the current JavaScript environment.

`assertKeyGenerationIsAvailable()`

Throws an exception unless `crypto.subtle.generateKey()` is available in the current JavaScript environment and has support for the `Ed25519` curve.

`assertSigningCapabilityIsAvailable()`

Throws an exception unless `crypto.subtle.sign()` is available in the current JavaScript environment.

`assertVerificationCapabilityIsAvailable()`

Throws an exception unless `crypto.subtle.sign()` is available in the current JavaScript environment.

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