Skip to content

Releases: dan-da/hd-wallet-derive

v0.5.0

06 Nov 04:34
Compare
Choose a tag to compare

This release works with php 8 and above. Older versions of PHP are untested and probably will not work.

v0.4.4

18 May 14:35
Compare
Choose a tag to compare

This release fixes the Bip32 path preset for LedgerLive.

v0.4.3

14 May 18:20
Compare
Choose a tag to compare

It's been a while. This release adds:

  • Path presets for common wallet software, hardware wallets, and Bip standards such as Bip32, Bip44, Bip49, Bip84.
  • Variables in paths for insertion of coin, account, and change values.
  • Iteration can now occur at any path level, not only the deepest level. (needed by Ledger-Live)
  • added --gen-words flag to control how many mnemonic words are created. [12..48]
  • corrected ethereum private key serialization
  • minor bug fixes

v0.4.2

18 Oct 16:43
Compare
Choose a tag to compare

Only minor changes in this release:

  • bump dan-da/coinparams to v0.2.9
  • disable test that is invalid with latest coinparams
  • Adds ubuntu php ext requirements to readme.
  • Add missing exceptions and gitignore
  • Add Linux Ubuntu 16.04 requirements
  • gracefully handle exec errors for json callers

hd-wallet-derive-v0.4.1

21 Jul 04:10
Compare
Choose a tag to compare

This release adds support for bitcoin-core style key derivation with these two features:

  1. new flag --addr-type=[legacy|p2sh-segwit|bech32|auto]. Allows to override automatic address-type detection based on key-type.
  2. x' in bip32 path to request hardened key for derived addresses. ex: --path="m/0'/0'/x'".

Read the details.

hd-wallet-derive-v0.4.0

18 Jul 12:44
Compare
Choose a tag to compare

This is a big release. The major new things are:

  • segwit support for bitcoin and most btc derived coins. (segwit keys for other coins is super highly experimental)
  • both p2sh (y) and bech32 (z) segwit addresses are supported.
  • support for LTC Ltub/Mtub style keys in addition to xpub/xpriv
  • support for LTC new style p2sh 'M' addresses.
  • lots of test cases
  • various bug fixes and enhancements.

At this moment, I believe this tool will generate keys/addresses for more blockchains (including testnets, regtest) than any other tool on the planet.

See the readme for details and examples of using segwit keys.

hd-wallet-derive-v0.3.2

08 Jul 11:44
Compare
Choose a tag to compare

This release adds back support for ethereum addresses. Presently only ethereum mainnet is supported.

example key generation

$ ./hd-wallet-derive.php --coin=ETH --gen-key --format=jsonpretty -g
[
    {
        "coin": "ETH",
        "seed": "dc0396ada2c3e1ce6995820716cf6fea22d54a8b8191cab61fb7540ecf0c3a42fb91a0f68b7ac0ed7555dd3bda05ec2b769491a68f63082f8d4723ce2f085078",
        "mnemonic": "athlete alone tent cherry motor able gym lobster mad ahead peanut anger congress segment horn hidden crater host thumb audit sugar casino produce garment tag rose planet law gather human drop analyst tank cabbage casino hybrid fun science wheel bring insect helmet million guide survey grace save top",
        "master_priv_key": "xprv9s21ZrQH143K4DQeGofUmKVrfUJi85d6PrnXY9xVerzRha15g4eoXYgvi3RvmwftTUkCvXmU91g35KrYjmTTjLBg2EraDW7EsNPDhgdCzqL",
        "path": "m\/44'\/60'\/0'\/0",
        "ext_priv_key": "xprvA18QLJYVPaGy4Zyt3zjk41s6heKWAQ4PiTWb4bP16pon5WZMyRv75ggpoYteB8dv9UP9yXWdAG9cQpudfQ4Fcr73AViDMJh4XdXm95fq5ap",
        "ext_pub_key": "xpub6E7kjp5PDwqGH44MA2GkR9oqFg9zZrnF5gSBryncfALkxJtWWyEMdV1Jer41xHqX6Afkb8EcwR2aF2H1UCUfgEctYwGbKsLz5FtZJyYvpsJ"
    }
]

Example derivation using nmemonic

$ ./hd-wallet-derive.php --coin=ETH --mnemonic="athlete alone tent cherry motor able gym lobster mad ahead peanut anger congress segment horn hidden crater host thumb audit sugar casino produce garment tag rose planet law gather human drop analyst tank cabbage casino hybrid fun science wheel bring insect helmet million guide survey grace save top" --cols=path,address --numderive=3 -g

+------------------+--------------------------------------------+
| path             | address                                    |
+------------------+--------------------------------------------+
| m/44'/60'/0'/0/0 | 0x92C4210c2fbC3237efb8a93611d0E61c3936E84b |
| m/44'/60'/0'/0/1 | 0x4b7A3CFc314D92447a8F2Ebe3F7b93D469bC195b |
| m/44'/60'/0'/0/2 | 0x1702ebaA4cD9AD453ea45569e27B877338d48862 |
+------------------+--------------------------------------------+

Example derivation using xprv

 ./hd-wallet-derive.php --coin=ETH --key=xprvA18QLJYVPaGy4Zyt3zjk41s6heKWAQ4PiTWb4bP16pon5WZMyRv75ggpoYteB8dv9UP9yXWdAG9cQpudfQ4Fcr73AViDMJh4XdXm95fq5ap --cols=path,address --numderive=3 -g

+------+--------------------------------------------+
| path | address                                    |
+------+--------------------------------------------+
| m/0  | 0x92C4210c2fbC3237efb8a93611d0E61c3936E84b |
| m/1  | 0x4b7A3CFc314D92447a8F2Ebe3F7b93D469bC195b |
| m/2  | 0x1702ebaA4cD9AD453ea45569e27B877338d48862 |
+------+--------------------------------------------+```

hd-wallet-derive-v0.3.1

04 Jul 14:32
Compare
Choose a tag to compare

Changes in this release:

  • Add --gen-key flag to generate a new master key, mnemonic, seed, and extended keys for any supported cryptocurrency.
  • default --path to use bip44 path for --coin when --mnemonic is specified.
  • fixed display of BitcoinCash addresses and added --bch-format flag. Supported formats are "cash" or "legacy".
  • fix issue 1. avoid null param exception in Bip39SeedGenerator::getSeed() when password is omitted

Example of using the new --gen-key flag:

$ ./hd-wallet-derive.php --coin=DOGE --gen-key --format=jsonpretty -g
[
    {
        "coin": "DOGE",
        "seed": "a3adc3e71ac05b3336422e6506d646e995f7bfcb960e6fca48dc13c93fae8ef3dc37a6013791ad1cfe7fe408de0e7676a9fe29b02413c79b988d54c74515d3db",
        "mnemonic": "arch hover pen regret priority sugar thunder glimpse west diagram path sword divide spread anger vendor century roof agree know treat drastic allow blind advance oil iron gold skate absorb stem shiver can pear twin helmet loan satisfy fragile admit comfort mercy pelican pupil debate tornado rifle desert",
        "master_priv_key": "dgpv51eADS3spNJh8eoSPqujdFPAhBZywAW6KQrR5TqM1Q5NMsrJmFP1hTXvfbUHLQFLmh4jVYZjXtJvKJVakn5YxT48mocEXu7yTNkCYN29cMV",
        "path": "m\/44'\/3'\/0'\/0",
        "ext_priv_key": "dgpv59SfnUBjPvKLfM453bkxJXHRfNvDQ3zAngt3fpKheqR846z9W1QYzoUz5ss4qtvLU7iBd93nw8ZXcXArpdLjuyudR2uUFH4KeV9Nes8eNeJ",
        "ext_pub_key": "dgub8tKh8A7cx4yfxCiE5qNvRNq27wHrEB1t5HfFpvigSxU8cA6qumxKe6tdf7TkUPFBoj6C8eBxofiydXy5hGf471zWZkYiy4tQ6vWqRwETdGA"
    }

Example of using --bch-format flag:

./hd-wallet-derive.php --coin=BCH --bch-format=cash --key=xpub6EJnEgHvi29eVL5tsJvBJjLamiCa8tGmH3Jog3XjgF4GsVpyJ7ZV1EwEnekpFEspXup5mkcyMB9saEr9h1HXtVCBA6J5arX4wDLkPpG5Vm9 --numderive=3 --cols=path,address -g

+------+--------------------------------------------------------+
| path | address                                                |
+------+--------------------------------------------------------+
| m/0  | bitcoincash:qrld9tflxwdsm6qzzrkclh7v0j84cutjdgqq9xzy5d |
| m/1  | bitcoincash:qq3flt3ketuw0euvmpkt4hqm06x6ec0585qqs3g4zy |
| m/2  | bitcoincash:qz7lskgn36kfdl93frra5aaznsfcahf5lyqqsmvsw2 |
+------+--------------------------------------------------------+

$ ./hd-wallet-derive.php --coin=BCH --bch-format=legacy --key=xpub6EJnEgHvi29eVL5tsJvBJjLamiCa8tGmH3Jog3XjgF4GsVpyJ7ZV1EwEnekpFEspXup5mkcyMB9saEr9h1HXtVCBA6J5arX4wDLkPpG5Vm9 --numderive=3 --cols=path,address -g
+------+------------------------------------+
| path | address                            |
+------+------------------------------------+
| m/0  | 1QEP1oWNm4cUhJqXCT1SgSfvNNVucyGTYu |
| m/1  | 14A5GKXrbQkJSDjGE3SvjhPjsq2g1m4Q3B |
| m/2  | 1JKUDmuus32bGnXp3DxfJBDBzecMv8mQfd |
+------+------------------------------------+

note that 'cash' is the default for --bch-format.

hd-wallet-derive-v0.3.0

02 Jul 10:09
Compare
Choose a tag to compare
Pre-release

This release adds support for deriving addresses of hundreds of altcoins with the new --coin and --helpcoins flags. Data for the altcoins comes from coinparams.

Unfortunately ethereum support is temporarily dropped in this release until it can be refactored to fit the new multi-coin model.

Thanks go to @tboydston for the initial multicoin implementation.

hd-wallet-derive-v0.2.0

02 Jul 10:01
Compare
Choose a tag to compare

This release adds support for deriving Ethereum addresses.

Thanks go to @dukei for the Eth implementation.