Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@edgematrixjs/util

This project dependencies and exports third-party libraries and provides some methods including generate public and private keys.

Dependencies and Exports third-party libraries

"@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;

INSTALL

npm install --save @edgematrixjs/util

USAGE

import { genPrivateKey, addressWith } from '@edgematrixjs/util';
//Generate private and public keys
const privateKey = genPrivateKey();
const publicKey = addressWith(privateKey);

API

genPrivateKey - returns a string start with 0x.

addressWith(privateKey) - returns a string start with 0x.

The code from web3-eth-accounts@1.x