Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@solana/assertions

anza-xyz968kMIT3.0.1TypeScript support: included

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

blockchain, solana, web3

readme

npm npm-downloads
code-style-prettier

@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.