1.1.1 • Published 6 months ago

keepmesafe v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

User Documentation for keepmesafe Package

keepmesafe is a command-line utility designed to securely manage and store private keys using ERC-2335 standards. It provides an interactive interface for adding, listing, deleting accounts, and managing encryption passwords.

npm

npm package

Quickstart

Get started quickly with these simple steps:

npm install -g keepmesafe  # Install keepmesafe globally
npx keepmesafe@latest      # Run keepmesafe

Getting Started

Installation

Install the package globally using:

npm install -g keepmesafe
yarn install -g keepmesafe
pnpm install -g keepmesafe

Using the Command-Line Interface

Encrypt and Store Your Private Key.

Run the command:

npx keepmesafe@latest
yarn keepmesafe@latest
pnpm keepmesafe@latest

You will be prompted to provide your private key, encryption password, and an account name.

Options:

  • -pk, --private-key value: Directly provide a private key.
  • -p, --password value: Specify a secret key for decryption.
  • -a, --account-name value: Provide an account name for the private key.
  • -d, --delete value: Delete a specified account.
  • -hmp, --hide-my-privates: Create a precommit git hook to prevent you from pushing API keys

  • -la, --accounts: List all accounts in the keystore.

Note: Encrypted keys are stored in ~/pancerna/keystore.json.

Storing and Managing Your Password with keepmesafe

How to Store the Password

Upon setup, you'll be prompted to insert an encryption password. A 32-character hexadecimal password is generated if you don't provide one.

Where to Store the Password

The encryption password will be stored in a .password file in the root directory where you run the tool.

Extra Security Tips

Backup your .password file. Maintain strict Access Control. Consider External Storage for the .password file. Note: The .password file is automatically added to .gitignore.

Using Functions in Your Code

Retrieving Encrypted Private Key

Use betterKey or betterKeyAsync to decrypt and retrieve your private key.

import { betterKey } from "keepmesafe";

const fetchKey = async () => {
  const key = await betterKey("accountName");
  // Output: decrypted key
};

fetchKey();

Convert your private key back to hexadecimal

const fetchKey = async () => {
  const key = await betterKey("accountName").toHex();
  // Output: hexadecimal key
};
fetchKey();

Contributions

We welcome contributions from the community! Please refer to our contributing guidelines for more information.

Maintainers

Changelog

V1.1.1: New command --hide-my-private to create git precommit hooks and prevent devs from pushing hard coded private keys.

V1.0.1: Inline options for key management. Automated .password file creation and .gitignore updates. For support or contribution, please refer to our GitHub Repository.

License This project is licensed under MIT.

1.1.1

6 months ago

1.0.91

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago