Skip to content

kseo/codechain-keystore

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeChain keystore

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 await cckey.close();
};
example();

How your private key is saved

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

About

A private key management library for CodeChain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.0%
  • JavaScript 3.0%