codechain-keystore
TypeScript icon, indicating that this package has built-in type declarations

0.6.3 • Public • Published

CodeChain keystore Build Status

CodeChain keystore is a private key management library. It saves CodeChain's asset transfer address safely in a disk. If you want to manage CodeChain keys using nodejs, you should use this.

Example

var CCKey = require('codechain-keystore');
 
async function example() {
  const cckey = await CCKey.create();
  const savedKeys = await cckey.platform.getKeys();
  console.dir(savedKeys);
  await cckey.platform.createKey({ passphrase: "my password" });
  const savedKeys_ = await cckey.platform.getKeys();
  console.dir(savedKeys_);
 
  await cckey.close();
};
example();
 

How your private key is saved

We use a JSON file to save an encrypted private key. You can find the file in ./keystore.db

Readme

Keywords

none

Package Sidebar

Install

npm i codechain-keystore

Weekly Downloads

1

Version

0.6.3

License

ISC

Unpacked Size

204 kB

Total Files

62

Last publish

Collaborators

  • cubismic
  • hoongee
  • jh_kodebox
  • jjg_kodebox
  • jmyang_kodebox
  • rbtree_kodebox