@fiandev/ina-phrase
v1.0.1
Published
indonesian seed phrase word list
Readme
@fiandev/ina-phrase
A TypeScript library and CLI tool for generating Indonesian BIP39 seed phrases and deriving Bitcoin keys.
Features
- Generate random BIP39 seed phrases using Indonesian words
- Derive Bitcoin keys from seed phrases
- Display QR codes for keys in terminal
- CLI tool for easy command-line usage
- TypeScript support with full type definitions
Installation
As a library
npm install @fiandev/ina-phraseAs a CLI tool (global install)
npm install -g @fiandev/ina-phraseUsage
CLI Commands
Generate a random seed phrase
ina-phrase generate <length>Where <length> is either 12 or 24.
Example:
ina-phrase generate 12
# Output: masa gila kabel brutal watu halim desi sakral curah opor ebong bundaGet keys from a seed phrase
ina-phrase keys "<seed-phrase>"Example:
ina-phrase keys "masa gila kabel brutal watu halim desi sakral curah opor ebong bunda"
# Output:
# {
# "privateKey": "85d6da48f237235a877f224d3b6c775d82dab8ccb117f2d35f3113ffd31348b6",
# "publicKey": "033c2103985493608123817693fe4f5c38e86ec979fe4d9b814369a6dc622d407e",
# "address": "1F61pasuA5urBzp4XHN6aW3X9pAaML11ZL"
# }Print QR codes for keys
ina-phrase print <private-key> <public-key> <address>Example:
ina-phrase print \
"85d6da48f237235a877f224d3b6c775d82dab8ccb117f2d35f3113ffd31348b6" \
"033c2103985493608123817693fe4f5c38e86ec979fe4d9b814369a6dc622d407e" \
"1F61pasuA5urBzp4XHN6aW3X9pAaML11ZL"
# Outputs QR codes in terminalLibrary Usage
import IndonesianSeedPhrase from '@fiandev/ina-phrase';
const isp = new IndonesianSeedPhrase();
// Generate a random seed phrase
const seedPhrase = isp.generateRandomSeedPhrase(12);
console.log(seedPhrase); // "masa gila kabel brutal watu halim desi sakral curah opor ebong bunda"
// Get keys from seed phrase
const keys = isp.getKeysFromSeedPhrase(seedPhrase);
console.log(keys);
// {
// privateKey: "85d6da48f237235a877f224d3b6c775d82dab8ccb117f2d35f3113ffd31348b6",
// publicKey: "033c2103985493608123817693fe4f5c38e86ec979fe4d9b814369a6dc622d407e",
// address: "1F61pasuA5urBzp4XHN6aW3X9pAaML11ZL"
// }
// Print QR codes (async)
await isp.print(keys.privateKey, keys.publicKey, keys.address);API Reference
IndonesianSeedPhrase
Methods
generateRandomSeedPhrase(len: 12 | 24): string- Generates a random seed phrasegetKeysFromSeedPhrase(seedPhrase: string): { privateKey: string, publicKey: string, address: string }- Derives Bitcoin keys from seed phraseprint(privateKey: string, publicKey: string, address: string): Promise<void>- Prints keys and QR codes to console
Development
# Install dependencies
yarn install
# Build the project
yarn build
# Run tests
yarn testLicense
MIT - see LICENSE file for details.
