All Projects → CodeChain-io → Codechain Keystore Js

CodeChain-io / Codechain Keystore Js

Licence: isc
A private key management library for CodeChain

Programming Languages

typescript
32286 projects

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].