2.1.0 • Published 5 months ago

@dokimon/assertions v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

npm npm-downloads code-style-prettier

@dokimon/assertions

This package contains utilities for asserting that a JavaScript environment supports certain features necessary for the operation of the Dokimon 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.

2.1.0

5 months ago