BLS TypeScript Key Management
Utility methods for generating valid BLS keys from random bytes or mnemonic for NodeJs and Browser.
Implementation is following EIPS: EIP-2334, EIP-2333
For low level methods of EIP-2333, check out @chainsafe/bls-hd-key.
How to use?
import {generateRandomSecretKey, mnemonicToSecretKey, deriveKey} from "@chainsafe/bls-keygen";
const secretKey = generateRandomSecretKey();
...
const secretKey = mnemonicToSecretKey(
"impact exit example acquire drastic cement usage float mesh source private bulb twenty guitar neglect",
"m/12381/3600/0/0"
);
...
const secretKey = deriveKey(
seed,
"m/12381/3600/0/0"
);
Contribution
Requirements:
yarn install
yarn run test