HD Extended Key Kit

Derive Bitcoin-family addresses, xpub, ypub, zpub, private extended keys, Ethereum/EVM addresses, Solana SLIP10 addresses, and multi-chain HD wallet keys from BIP-39 mnemonics or raw seeds.

GitHub source · llms.txt · llms-full.txt

Bitcoin
xpub/xprv, ypub/yprv, zpub/zprv, and 1..., 3..., bc1... addresses.
Litecoin / Dogecoin
Registered and compatibility HD extended-key formats plus addresses.
Ethereum / EVM
BIP44 account private/public keys and EIP-55 addresses.
Solana
SLIP10 ed25519 address derivation with no false xpub claims.

Install

npm install github:devdasx/hd-extended-key-kit#0.2.0

Use

import { deriveAddress, deriveAddressFromExtendedKey, deriveHdKeys } from "hd-extended-key-kit";

const keys = deriveHdKeys({
  chain: "bitcoin",
  format: "zpub",
  mnemonic: "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
});

const address = deriveAddress({
  chain: "bitcoin",
  format: "zpub",
  mnemonic: "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
  index: 0
});

const watchOnly = deriveAddressFromExtendedKey({
  chain: "bitcoin",
  extendedKey: keys.publicExtendedKey,
  index: 0
});

console.log(keys.publicExtendedKey);
console.log(address.address);
console.log(watchOnly.address);

CLI

hdkeykit derive --chain bitcoin --format zpub --mnemonic "..." --pretty
hdkeykit address --chain bitcoin --format zpub --mnemonic "..." --index 0 --pretty
hdkeykit address-from-xpub --chain bitcoin --xpub "zpub..." --index 0 --pretty
hdkeykit derive --chain ethereum --mnemonic "..." --pretty
hdkeykit address --chain ethereum --mnemonic "..." --pretty
hdkeykit derive --chain solana --mnemonic "..." --pretty