crypto-patterns
Installation
SKILL.md
Crypto Patterns
Domain-specific patterns for blockchain integration, wallet management, smart contract interaction, and DeFi. Covers key security, transaction construction, and common Ethereum/Bitcoin patterns.
Core Patterns
Pattern: HD Wallet Derivation with Secure Randomness
// CORRECT: Use @scure/bip39 (audited library, pure TypeScript)
import { generateMnemonic, mnemonicToSeedSync, validateMnemonic } from '@scure/bip39';
import { wordlist } from '@scure/bip39/wordlists/english';
import { HDKey } from '@scure/bip32';
// 256 bits = 24 words; 128 bits = 12 words
// 24 words is recommended for financial applications
const mnemonic = generateMnemonic(wordlist, 256);