Offline multi-chain HD wallet derivation
Project description
Wallet HD Derivation Kit
Production-oriented, offline HD-wallet derivation for Swift, JavaScript, React Native, Python, Rust, Go, Dart/Flutter, Kotlin/JVM/Android, and the wallethd CLI. Every implementation is native to its language and checked against the same public vectors.
Security: derivation is deterministic, but secret handling is your responsibility. Never paste a real mnemonic into source code, logs, analytics, issue reports, or an online playground. This project has not yet received an independent third-party audit.
30-second start
JavaScript:
npm install wallet-hd-derivation-kit
import { deriveAddress } from "wallet-hd-derivation-kit";
const result = deriveAddress({
source: { mnemonic: process.env.WALLET_MNEMONIC },
chain: "bitcoin",
});
console.log(result.address); // private material is not in this result
CLI:
brew install devdasx/crypto-kits/wallethd
wallethd address --chain bitcoin --prompt --pretty
The CLI reads mnemonic/seed material through a hidden prompt, stdin, or a permission-checked file. Mnemonics, seeds, and passphrases are never accepted as command-line values. Private output requires --show-secrets.
Install
| Platform | Command |
|---|---|
| Swift Package Manager | .package(url: "https://github.com/devdasx/wallet-hd-derivation-kit.git", from: "1.0.0") |
| CocoaPods | pod 'WalletHDDerivationKit', '~> 1.0' |
| npm | npm install wallet-hd-derivation-kit |
| GitHub npm | npm install @devdasx/wallet-hd-derivation-kit |
| JSR | deno add jsr:@devdasx/wallet-hd |
| Python | python -m pip install wallet-hd-derivation-kit |
| Rust | cargo add wallet-hd-derivation-kit |
| Go | go get github.com/devdasx/wallet-hd-derivation-kit@v1.0.0 |
| Dart / Flutter | dart pub add wallet_hd_derivation_kit / flutter pub add wallet_hd_derivation_kit |
| Kotlin / Android | implementation("io.github.devdasx:wallet-hd-derivation-kit:1.0.0") |
| Homebrew CLI | brew install devdasx/crypto-kits/wallethd |
| Cargo CLI | cargo install wallet-hd-derivation-kit --version 1.0.0 --locked |
| Shell installer | curl -fsSL https://raw.githubusercontent.com/devdasx/wallet-hd-derivation-kit/v1.0.0/install.sh | sh |
| Container | docker run --rm ghcr.io/devdasx/wallethd:1.0.0 list-chains |
Swift Package Manager requires Swift tools 6.2 or newer. CocoaPods consumers compile the same Swift sources with the toolchain selected by their application.
See the verified examples for Swift, JavaScript, React Native, Python, Rust, Go, Dart, Flutter, Kotlin, and CLI.
Supported chains
| Family | Chains and behavior |
|---|---|
| Bitcoin | Mainnet/testnet BIP-44/49/84/86; P2PKH, nested/native SegWit, Taproot; x/y/z/t/u/v pub/prv |
| Litecoin | BIP-44/49, Ltub/Ltpv and Mtub/Mtpv; native SegWit addresses may be derived from seed without inventing a prefix |
| UTXO BIP-44 | Dogecoin, Dash, DigiByte, Bitcoin Cash CashAddr, Zcash transparent |
| EVM | Ethereum, Ethereum Classic, Polygon, BNB Smart Chain, Avalanche C-Chain, Arbitrum, Optimism, Base; EIP-55 |
| TRON | BIP-44 coin type 195 and Base58Check T… addresses |
| Solana | Hardened SLIP-0010 Ed25519 and Base58 public-key addresses |
The machine-readable matrix is spec/chains.json. Cardano, Substrate, Cosmos, Stellar, NEAR, and XRP are intentionally not advertised in v1 because their chain-specific derivation rules require separate work.
Standards boundary
xpub, ypub, and zpub are Bitcoin-style BIP-32/SLIP-0132 serialized keys, not universal chain formats. Generic secp256k1 extended keys require an explicit chain when deriving an address because version bytes do not identify every coin. Solana uses hardened SLIP-0010 Ed25519 and has neither a BIP-32 xpub nor public child derivation.
Public API
Each language provides idiomatic equivalents of:
deriveNode(source, curve, path)
deriveAccountPublicKey(source, chain, scriptType, account)
deriveAccountPrivateKey(...)
deriveAddress(source, chain, account, change, index, scriptType)
deriveAddresses(..., start, count)
deriveAddressFromExtendedPublicKey(...)
parseExtendedKey(...)
serializeExtendedKey(...)
supportedChains()
source is a checksum-validated English BIP-39 mnemonic plus optional passphrase, or a 16–64 byte seed. Paths must be absolute and may use ', h, or H for hardened components. Normal result serialization excludes private data; private key exports are available only from explicitly named private APIs.
CLI
wallethd account Derive an account xpub; --show-secrets selects private output
wallethd address Derive one address
wallethd addresses Derive a bounded batch
wallethd from-xpub Derive watch-only addresses
wallethd derive-path Derive an explicit path
wallethd inspect-key Parse an extended key
wallethd list-chains Print machine-readable chain support
wallethd vectors verify
wallethd demo Run only published test vectors
wallethd completion Generate shell completions
wallethd version
Successful data commands emit JSON schema v1 and exit 0. Any usage, secret-input, verification, or derivation failure exits 2 and writes a concise error to stderr. The CLI makes no telemetry, RPC, balance, update-check, or other network request.
Correctness and trust
- Seven native implementations agree on all 18 default chain vectors in
npm run conformance. - Tests cover watch-only public derivation, public/private child equivalence, BIP-86, SLIP-0132, malformed paths, invalid checksums, batch limits, and serialization round trips.
- Public vectors live in the versioned test-vectors collection, including every official BIP-32 valid/invalid vector and the SLIP-0010 Ed25519 chain.
- Dependency choices and exact pins are documented in DEPENDENCIES.md.
- Threats, non-goals, secret boundaries, fuzzing, and audit status are documented in SECURITY.md and docs/threat-model.md.
- No API performs runtime network I/O. See OFFLINE.md.
Source of truth and releases
GitHub is the only source repository. Registry packages are immutable builds of signed vX.Y.Z tags; registry copies are never edited independently. A merge to main redeploys documentation. Release jobs are separately rerunnable and skip versions that already exist.
Repository: https://github.com/devdasx/wallet-hd-derivation-kit
Documentation: https://devdasx.github.io/wallet-hd-derivation-kit/
Changelog: CHANGELOG.md
Security policy: SECURITY.md
MIT © ROYO STUDIOS.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wallet_hd_derivation_kit-1.0.0.tar.gz.
File metadata
- Download URL: wallet_hd_derivation_kit-1.0.0.tar.gz
- Upload date:
- Size: 200.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6faeda0a21eb14785f431f9b180e11c51537ad5fcf747f4f0f2c1469dfe9da75
|
|
| MD5 |
33fd47e4f95667ce1ff2781963bde308
|
|
| BLAKE2b-256 |
016b62863265ceffea70fb263e5b5b5b2b6843dd1da1ca4a96be785349e97f43
|
Provenance
The following attestation bundles were made for wallet_hd_derivation_kit-1.0.0.tar.gz:
Publisher:
release.yml on devdasx/wallet-hd-derivation-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wallet_hd_derivation_kit-1.0.0.tar.gz -
Subject digest:
6faeda0a21eb14785f431f9b180e11c51537ad5fcf747f4f0f2c1469dfe9da75 - Sigstore transparency entry: 2164268209
- Sigstore integration time:
-
Permalink:
devdasx/wallet-hd-derivation-kit@cc67ee82e2021cfa12bb4d22961f0700faf90752 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/devdasx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cc67ee82e2021cfa12bb4d22961f0700faf90752 -
Trigger Event:
push
-
Statement type:
File details
Details for the file wallet_hd_derivation_kit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: wallet_hd_derivation_kit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c12852f11445c6feb704fb5258f1c747f3b3f56d8be2e548e25376351bee4f1c
|
|
| MD5 |
4b1682677d9d2a719de9583e46baec95
|
|
| BLAKE2b-256 |
1cb4b139087190d95c1bd540c42d0d04c32f50f2c96c1eaa0041ea27e4045c22
|
Provenance
The following attestation bundles were made for wallet_hd_derivation_kit-1.0.0-py3-none-any.whl:
Publisher:
release.yml on devdasx/wallet-hd-derivation-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wallet_hd_derivation_kit-1.0.0-py3-none-any.whl -
Subject digest:
c12852f11445c6feb704fb5258f1c747f3b3f56d8be2e548e25376351bee4f1c - Sigstore transparency entry: 2164268218
- Sigstore integration time:
-
Permalink:
devdasx/wallet-hd-derivation-kit@cc67ee82e2021cfa12bb4d22961f0700faf90752 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/devdasx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cc67ee82e2021cfa12bb4d22961f0700faf90752 -
Trigger Event:
push
-
Statement type: