keyfuse
v0.2.6
Published
A library for deterministic multi-wallet operations
Maintainers
Readme
Keyfuse 🔑
A TypeScript library and CLI tool for generating deterministic ethereum wallet with a combination of mnemonics and/or private keys.
Features
- Interactive CLI for easy wallet management
- Deterministic key derivation
- Support for both mnemonics and private keys
Table of Contents
CLI Tool
CLI Installation
Install the CLI tool globally:
Using npm
npx keyfuse
# or
npm install -g keyfuse
keyfuseUsing Bun
bunx keyfuse
# or
bun add -g keyfuse
keyfuseCLI Usage
The CLI guides you through:
- Adding mnemonic phrases
- Adding private keys
- Generating deterministic wallets
CLI Options
Usage: keyfuse [options]
Options:
-o, --output <filename> Output file path for the generated wallet (default: wallet.json)
-h, --help Display help
-V, --version Display versionPackage
Package Installation
Add Keyfuse to your project:
Using npm
npm install keyfuseUsing Bun
bun add keyfusePackage Usage
import { FusedWallet } from 'keyfuse';
// Create a new wallet instance
const wallet = new FusedWallet();
// Add wallets using mnemonics or private keys
wallet.addMnemonic('your mnemonic phrase here');
wallet.addPrivateKey('0x...');
// Generate deterministic wallet
const deterministicWallet = wallet.generateDeterministicWallet();
// Get wallet information
const info = wallet.getWalletInfo();API Documentation
FusedWallet
Main class for managing multiple wallets and generating deterministic keys.
Methods
addMnemonic(mnemonic: string, accountNumber = 0): void
Add a wallet using a mnemonic phrase and optional account index.addPrivateKey(privateKey: string): void
Add a wallet using a private key.generateDeterministicWallet(): DeterministicWallet
Generate a deterministic wallet from all added wallets.getWalletInfo(): WalletInfo
Get information about the wallet collection.clear(): void
Clear all stored wallet data.
Development
- Clone the repository
- Install dependencies:
# Using npm npm install # Or using Bun bun install - Build the project:
# Using npm npm run build # Or using Bun bun run build - Run tests:
# Using npm npm test # Or using Bun bun test
License
MIT
