This project dependencies and exports third-party libraries and provides some methods including generate public and private keys.
"@ethereumjs/rlp": "^4.0.1",
"@ethereumjs/util": "^8.0.5",
"ethereum-cryptography": "^1.2.0"
export { keccak256 } from 'ethereum-cryptography/keccak';
export * from '@ethereumjs/util';
export const rlp = RLP;
npm install --save @edgematrixjs/util
import { genPrivateKey, addressWith } from '@edgematrixjs/util';
//Generate private and public keys
const privateKey = genPrivateKey();
const publicKey = addressWith(privateKey);
genPrivateKey
- returns a string
start with 0x
.
addressWith(privateKey)
- returns a string
start with 0x
.
The code from web3-eth-accounts@1.x