Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@turnkey/crypto

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turnkey/crypto - npm Package Compare versions

Comparing version
2.8.3
to
2.8.4
+6
-0
CHANGELOG.md
# @turnkey/crypto
## 2.8.4
### Patch Changes
- [#1050](https://github.com/tkhq/sdk/pull/1050) [`c745646`](https://github.com/tkhq/sdk/commit/c745646ae4b2a275e116abca07c6e108f89beb04) Author [@amircheikh](https://github.com/amircheikh) - - Removed `@peculiar/webcrypto` dependancy. This will fix build errors in environments where `webcrypto` is not defined but will still require a polyfill if you use a function where `webcrypto` is required.
## 2.8.3

@@ -4,0 +10,0 @@

+2
-12

@@ -38,15 +38,5 @@ 'use strict';

}
try {
// Dynamic import to prevent bundling in environments that already have WebCrypto
const { Crypto: PeculiarCrypto } = await import('@peculiar/webcrypto');
cryptoInstance = new PeculiarCrypto();
x509__namespace.cryptoProvider.set(cryptoInstance);
return cryptoInstance;
else {
throw new Error("Web Crypto API is not available in this environment. You may need to polyfill it.");
}
catch {
// Happens usually on React Native
throw new Error("No WebCrypto implementation found. " +
"In React Native, please polyfill `global.crypto.subtle` (e.g., with `react-native-webcrypto`) " +
"before calling verify().");
}
};

@@ -53,0 +43,0 @@ /**

@@ -16,15 +16,5 @@ import { uint8ArrayToHexString, uint8ArrayFromHexString } from '@turnkey/encoding';

}
try {
// Dynamic import to prevent bundling in environments that already have WebCrypto
const { Crypto: PeculiarCrypto } = await import('@peculiar/webcrypto');
cryptoInstance = new PeculiarCrypto();
x509.cryptoProvider.set(cryptoInstance);
return cryptoInstance;
else {
throw new Error("Web Crypto API is not available in this environment. You may need to polyfill it.");
}
catch {
// Happens usually on React Native
throw new Error("No WebCrypto implementation found. " +
"In React Native, please polyfill `global.crypto.subtle` (e.g., with `react-native-webcrypto`) " +
"before calling verify().");
}
};

@@ -31,0 +21,0 @@ /**

{
"name": "@turnkey/crypto",
"version": "2.8.3",
"version": "2.8.4",
"main": "./dist/index.js",

@@ -41,8 +41,7 @@ "module": "./dist/index.mjs",

"@noble/hashes": "1.8.0",
"@peculiar/webcrypto": "1.5.0",
"@peculiar/x509": "1.12.3",
"borsh": "2.0.0",
"cbor-js": "0.1.0",
"@turnkey/encoding": "0.6.0",
"@turnkey/sdk-types": "0.6.3"
"@turnkey/sdk-types": "0.6.3",
"@turnkey/encoding": "0.6.0"
},

@@ -53,4 +52,4 @@ "devDependencies": {

"jest": "29.7.0",
"@turnkey/api-key-stamper": "0.5.0",
"@turnkey/http": "3.13.1"
"@turnkey/http": "3.13.1",
"@turnkey/api-key-stamper": "0.5.0"
},

@@ -57,0 +56,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet