@gxchain2/wallet
v0.0.1
Published
[![NPM Version](https://img.shields.io/npm/v/@gxchain2/wallet)](https://www.npmjs.org/package/@gxchain2/wallet) ![License](https://img.shields.io/npm/l/@gxchain2/wallet)
Downloads
11
Readme
@gxchain2/wallet
Wallet based on ethereumjs-wallet
, for managing local accounts
INSTALL
npm install @gxchain2/wallet
USAGE
const manager = new AccountManager('/root/.gxchain2/keystore');
// new account
const { address } = await manager.newAccount('passphrase');
console.log('new address:', address);
// unlock account
await manager.unlock(address, 'passphrase');
// get account private key
console.log(manager.getPrivateKey(address).toString('hex'));