Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@chainsafe/bls-keystore
Advanced tools
![npm](https://img.shields.io/npm/v/@ChainSafe/bls-keystore) ![Discord](https://img.shields.io/discord/593655374469660673?color=blue&label=Discord&logo=discord) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/
Typescript implementation of EIP 2335 for node and browser.
Functional interface
import {Buffer} from "buffer";
import {
IKeystore,
create,
decrypt,
verifyPassword,
isValidKeystore,
validateKeystore,
} from "@chainsafe/bls-keystore";
// encrypt private key
const password: string | Uint8Array = "SomePassword123";
const privateKey: Uint8Array = ...;
const publicKey: Uint8Array = ...;
const path: string = "m/12381/60/0/0";
// keystore is an `object` that follows the EIP-2335 schema
const keystore: IKeystore = await create(password, privateKey, publicKey, path);
// verify password
await verifyPassword(keystore, password); //true | false
// decrypt
const decryptedPrivateKey: Buffer = await decrypt(keystore, password);
// convert to string
JSON.stringify(keystore); //string
// determine if unsanitized data fits the EIP-2335 schema
const data: unknown = ...;
isValidKeystore(data); // true | false
validateKeystore(data); // throws if invalid
Class-based interface
import {Buffer} from "buffer";
import {
Keystore,
} from "@chainsafe/bls-keystore";
// encrypt private key
const password: string | Uint8Array = "SomePassword123";
const privateKey: Uint8Array = ...;
const publicKey: Uint8Array = ...;
const path: string = "m/12381/60/0/0";
// keystore is a `Keystore` instance that follows the EIP-2335 schema with additional convenience methods
const keystore: Keystore = await Keystore.create(password, privateKey, publicKey, path);
// verify password
await keystore.verifyPassword(password); //true | false
// decrypt
const decryptedPrivateKey: Buffer = await keystore.decrypt(password);
// convert to string
keystore.stringify(); //string
// determine if unsanitized data fits the EIP-2335 schema
const data: unknown = ...;
Keystore.fromObject(data); // returns a Keystore or throws if data is invalid
For key derivation checkout @chainsafe/bls-keygen
FAQs
![npm](https://img.shields.io/npm/v/@ChainSafe/bls-keystore) ![Discord](https://img.shields.io/discord/593655374469660673?color=blue&label=Discord&logo=discord) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/
The npm package @chainsafe/bls-keystore receives a total of 442 weekly downloads. As such, @chainsafe/bls-keystore popularity was classified as not popular.
We found that @chainsafe/bls-keystore demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.