npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dogeuni-org/keyring

v1.0.12

Published

Multi-chain wallet management SDK for DogeUni ecosystem

Readme

DogeUni Keyring SDK

A powerful multi-chain wallet SDK that supports generating, recovering, and managing wallets for multiple blockchain networks.

Supported Networks

  • Bitcoin (BTC)
  • Dogecoin (DOGE)
  • PEP (PEP)
  • ClassZZ (CZZ)
  • EthereumFair (ETHF)
  • DogeOS (DOGEOS)

Key Features

  • Mnemonic Generation & Validation - Supports BIP39 standard
  • Multi-Network Wallet Generation - Generate wallets for multiple networks with one click
  • Network Configuration - Configure which networks to enable for wallet generation
  • Private Key Recovery - Recover wallets from private keys, WIF format, and encrypted JSON
  • Address Validation - Validate various blockchain address formats
  • Data Encryption - AES encryption for sensitive data protection
  • Message Signing - Support for Ethereum-like network message signing
  • Security Validation - Password strength and mnemonic strength validation

Installation

npm install @dogeuni-org/keyring

Quick Start

Basic Usage

import { DogeUniKeyring } from "@dogeuni-org/keyring";

// Create Keyring instance
const keyring = new DogeUniKeyring();

// Generate new mnemonic
const mnemonic = keyring.generateMnemonic();
console.log("Mnemonic:", mnemonic);

// Generate wallets for different networks
const bitcoinWallet = keyring.recoverWallet({
  mnemonic,
  network: "bitcoin",
  index: 0,
});

const dogecoinWallet = keyring.recoverWallet({
  mnemonic,
  network: "dogecoin",
  index: 0,
});

console.log("Bitcoin address:", bitcoinWallet.address);
console.log("Dogecoin address:", dogecoinWallet.address);

Network Configuration

import { MultiWalletManager } from "@dogeuni-org/keyring";
import { NetworkType } from "@dogeuni-org/keyring";

// Create wallet manager with specific networks enabled
const enabledNetworks: NetworkType[] = ["bitcoin", "dogecoin", "ethereum"];
const walletManager = new MultiWalletManager(
  undefined, // no initial wallets
  "my-password", // password
  enabledNetworks // only enable specified networks
);

// Check which networks are enabled
console.log("Enabled networks:", walletManager.getEnabledNetworks());

// Add a new network
walletManager.addEnabledNetwork("pepe");

// Remove a network
walletManager.removeEnabledNetwork("ethereum");

// Check if a network is enabled
console.log("Bitcoin enabled:", walletManager.isNetworkEnabled("bitcoin"));

// Reset to all supported networks
walletManager.resetNetworks();

Recover Wallet from Private Key

// Recover from private key
const wallet = keyring.recoverFromPrivateKey(
  "your-private-key-here",
  "bitcoin"
);

// Recover from WIF format
const wifWallet = keyring.recoverFromWIF("your-wif-private-key", "dogecoin");

Generate Multiple Addresses

// Generate 10 Bitcoin addresses
const wallets = keyring.generateMultipleWallets(mnemonic, "bitcoin", 10);

wallets.forEach((wallet, index) => {
  console.log(`Address ${index + 1}: ${wallet.address}`);
});

Ethereum-like Wallet Features

// Sign message
const message = "Hello from DogeUni!";
const signature = keyring.signMessage(
  message,
  wallet.privateKey,
  "ethereumfair"
);

// Verify signature
const recoveredAddress = keyring.verifyMessage(
  message,
  signature,
  "ethereumfair"
);

Encrypt Wallet

// Create encrypted wallet
const encryptedWallet = await keyring.createEncryptedWallet(
  wallet.privateKey,
  "your-password",
  "ethereumfair"
);

// Recover from encrypted wallet
const decryptedWallet = await keyring.recoverFromEncryptedJson(
  encryptedWallet,
  "your-password",
  "ethereumfair"
);

API Reference

DogeUniKeyring Class

Constructor

new DogeUniKeyring();

Methods

generateMnemonic(strength?: number): string

Generate a new mnemonic phrase

  • strength: Entropy bits (128, 160, 192, 224, 256), defaults to 256
validateMnemonic(mnemonic: string): boolean

Validate if a mnemonic is valid

mnemonicToSeed(mnemonic: string, password?: string): string

Generate seed from mnemonic

generateWallet(options: KeyringOptions): WalletInfo

Generate a new wallet (automatically generates mnemonic)

recoverWallet(options: RecoveryOptions): WalletInfo

Recover wallet from mnemonic

recoverFromPrivateKey(privateKey: string, network: SupportedNetwork): WalletInfo

Recover wallet from private key

recoverFromWIF(wif: string, network: SupportedNetwork): WalletInfo

Recover wallet from WIF format private key

generateMultipleWallets(mnemonic: string, network: SupportedNetwork, count: number, derivationPath?: string): WalletInfo[]

Generate multiple wallet addresses

validateAddress(address: string, network: SupportedNetwork): boolean

Validate address format

signMessage(message: string, privateKey: string, network: SupportedNetwork): string

Sign message (only supports Ethereum-like networks)

verifyMessage(message: string, signature: string, network: SupportedNetwork): string

Verify message signature

createEncryptedWallet(privateKey: string, password: string, network: SupportedNetwork): Promise

Create encrypted wallet

recoverFromEncryptedJson(encryptedJson: string, password: string, network: SupportedNetwork): Promise

Recover wallet from encrypted JSON

Type Definitions

type SupportedNetwork =
  | "bitcoin"
  | "dogecoin"
  | "pepe"
  | "classzz"
  | "ethereumfair"
  | "dogeos";

interface WalletInfo {
  address: string;
  privateKey: string;
  publicKey: string;
  network: SupportedNetwork;
  derivationPath?: string;
}

interface KeyringOptions {
  network: SupportedNetwork;
  derivationPath?: string;
  password?: string;
}

interface RecoveryOptions {
  mnemonic: string;
  network: SupportedNetwork;
  derivationPath?: string;
  password?: string;
  index?: number;
}

Derivation Paths

The SDK uses standard BIP44 derivation paths:

  • Bitcoin: m/44'/0'/0'/0/0
  • Dogecoin: m/44'/3'/0'/0/0
  • PEP/ClassZZ/EthereumFair/DogeOS: m/44'/60'/0'/0/0

Security Considerations

  1. Private Key Security: Never hardcode private keys in client-side code
  2. Mnemonic Backup: Securely backup mnemonics and never store them in the cloud
  3. Password Strength: Use strong passwords to protect encrypted wallets
  4. Environment Security: Generate and use wallets in secure environments

Bundle Optimization

This SDK includes advanced bundle optimization features:

Build Commands

# Standard build
npm run build

# Optimized build
npm run build:optimized

# Production build (maximum compression)
npm run build:prod

# Test different build configurations
npm run build:test

# Analyze Gzip compression
node scripts/gzip-compress.js

Bundle Sizes

  • Standard Build: ~4.1MB
  • Optimized Build: ~3.2MB (22% reduction)
  • Production Build: ~2.8MB (32% reduction)
  • Gzip Compressed: ~0.8MB (80% reduction)

Optimization Features

  • Advanced Terser Configuration: Multiple compression passes with aggressive optimizations
  • Code Splitting: Intelligent chunking by functionality (crypto, blockchain, utils)
  • Tree Shaking: Remove unused code and dependencies
  • Gzip Compression: Built-in compression analysis and optimization

Development

Prerequisites

  • Node.js >= 16.0.0
  • npm >= 8.0.0

Setup

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Type checking
npm run type-check

# Linting
npm run lint

Build Options

# Development build (readable code)
npm run build

# Optimized build (balanced size and debugging)
npm run build:optimized

# Production build (maximum compression)
npm run build:prod

# Test all build configurations
npm run build:test

Testing

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage

Browser Compatibility

The SDK is built for modern browsers and includes necessary polyfills:

  • Target: ES2020
  • Browsers: > 1% market share, last 2 versions
  • Polyfills: Node.js modules (crypto, buffer, stream, etc.)

Examples

Check the demo/ directory for complete examples:

  • KeyringTest.tsx - Basic usage example
  • MultiWalletTest.tsx - Advanced multi-wallet functionality

Run the demo:

cd demo
npm install
npm run dev

Performance

Bundle Optimization

The SDK implements several optimization strategies:

  1. Code Splitting: Separate chunks for crypto, blockchain, and utility functions
  2. Tree Shaking: Remove unused code during build
  3. Minification: Advanced Terser configuration for maximum compression
  4. Gzip Compression: Built-in compression analysis

Expected Performance

  • Initial Load: 32% smaller bundle size
  • Caching: Better cache efficiency with code splitting
  • Runtime: Optimized for modern JavaScript engines

Contributing

We welcome contributions! Please see our contributing guidelines:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

If you encounter any issues or have questions:

  1. Check the documentation
  2. Search existing issues
  3. Create a new issue with detailed information

Roadmap

  • [ ] Support for more blockchain networks
  • [ ] Hardware wallet integration
  • [ ] Advanced encryption features
  • [ ] WebAssembly optimizations
  • [ ] React Native optimizations

Changelog

See CHANGELOG.md for version history and updates.